home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-08-13 | 88.6 KB | [WSIO/WSEE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Listbox
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jun 29 12:11:13 1992, modified Thu Aug 13 06:51:53 1992, creator 'WSEE', type 'WSIO', 90212 bytes "Listbox" , at 0x160e4 356 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [WSIO] |
macFileCreator | [WSEE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 4c 69 73 74 62 6f | 78 00 00 00 00 00 00 00 |..Listbo|x.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 57 53 49 4f 57 53 45 | 45 01 00 00 00 00 00 00 |.WSIOWSE|E.......|
|00000050| 00 00 00 00 01 60 64 00 | 00 01 64 a6 74 e6 a1 a6 |.....`d.|..d.t...|
|00000060| af ef 49 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..I.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fb 87 00 00 |........|........|
|00000080| 00 2e cf 7a 00 00 91 73 | 00 2c 00 02 01 1b 01 eb |...z...s|.,......|
|00000090| 00 00 00 2c 00 00 00 02 | 00 00 39 82 00 00 02 66 |...,....|..9....f|
|000000a0| 00 00 00 2c 00 00 00 02 | 00 00 77 5d 00 00 07 b0 |...,....|..w]....|
|000000b0| 00 00 4a 40 00 4a 00 00 | 77 5d 00 00 07 b0 00 00 |..J@.J..|w]......|
|000000c0| 4a 40 00 4a 00 00 3a f9 | 00 00 03 00 00 00 21 f0 |J@.J..:.|......!.|
|000000d0| 00 4a 00 00 3a f9 00 00 | 03 00 00 00 21 f0 00 4a |.J..:...|....!..J|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 2e |........|........|
|000000f0| cf b2 00 00 73 d5 00 00 | 00 00 01 00 06 4d 6f 6e |....s...|.....Mon|
|00000100| 61 63 6f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |aco.....|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 09 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 02 | 84 22 ff ff 00 00 00 00 |........|."......|
|00000140| 00 2e f8 96 00 2e cf a2 | 00 00 00 00 00 2e cf ba |........|........|
|00000150| 00 2e f6 be 00 2e cf 76 | 00 00 00 00 00 00 b5 ce |.......v|........|
|00000160| 00 00 c9 ba 00 01 60 5c | 00 01 60 64 00 00 ab de |......`\|..`d....|
|00000170| 00 00 b5 ce 00 00 c9 ba | 00 01 23 b8 00 01 23 b8 |........|..#...#.|
|00000180| 00 01 37 3c 00 01 37 3c | 00 01 37 ec 00 01 5f ac |..7<..7<|..7..._.|
|00000190| 00 01 60 5c 00 01 37 ec | 00 01 5f ac 4c 69 73 74 |..`\..7.|.._.List|
|000001a0| 62 6f 78 20 4c 69 62 72 | 61 72 79 0d 0d 0d 41 20 |box Libr|ary...A |
|000001b0| 6c 69 73 74 62 6f 78 20 | 69 73 20 61 20 73 63 72 |listbox |is a scr|
|000001c0| 6f 6c 6c 61 62 6c 65 20 | 6c 69 73 74 20 6f 66 20 |ollable |list of |
|000001d0| 69 74 65 6d 73 20 74 68 | 61 74 20 63 61 6e 20 62 |items th|at can b|
|000001e0| 65 20 63 72 65 61 74 65 | 64 20 69 6e 20 61 20 77 |e create|d in a w|
|000001f0| 69 6e 64 6f 77 20 6f 72 | 20 64 69 61 6c 6f 67 2e |indow or| dialog.|
|00000200| 0d 0d 41 6e 20 69 74 65 | 6d 20 69 6e 20 61 20 6c |..An ite|m in a l|
|00000210| 69 73 74 62 6f 78 20 69 | 73 20 72 65 66 65 72 72 |istbox i|s referr|
|00000220| 65 64 20 74 6f 20 61 73 | 20 61 20 6c 69 73 74 20 |ed to as| a list |
|00000230| 65 6c 65 6d 65 6e 74 2c | 20 6f 72 20 65 6c 65 6d |element,| or elem|
|00000240| 65 6e 74 2e 0d 0d 4c 69 | 73 74 62 6f 78 65 73 20 |ent...Li|stboxes |
|00000250| 63 61 6e 20 62 65 20 61 | 20 6c 6f 74 20 6f 66 20 |can be a| lot of |
|00000260| 74 72 6f 75 62 6c 65 20 | 74 6f 20 63 72 65 61 74 |trouble |to creat|
|00000270| 65 20 61 6e 64 20 6d 61 | 69 6e 74 61 69 6e 2c 20 |e and ma|intain, |
|00000280| 73 6f 20 74 68 69 73 20 | 6c 69 62 72 61 72 79 20 |so this |library |
|00000290| 68 61 73 20 62 65 65 6e | 20 63 72 65 61 74 65 64 |has been| created|
|000002a0| 20 74 6f 20 6d 61 6b 65 | 20 74 68 65 20 6a 6f 62 | to make| the job|
|000002b0| 20 61 73 20 65 61 73 79 | 20 61 73 20 70 6f 73 73 | as easy| as poss|
|000002c0| 69 62 6c 65 2e 0d 0d 54 | 68 65 20 66 75 6e 63 74 |ible...T|he funct|
|000002d0| 69 6f 6e 61 6c 69 74 79 | 20 6f 66 20 61 20 6c 69 |ionality| of a li|
|000002e0| 73 74 62 6f 78 20 69 73 | 20 73 69 6d 69 6c 61 72 |stbox is| similar|
|000002f0| 20 74 6f 20 41 70 70 6c | 65 27 73 20 4c 69 73 74 | to Appl|e's List|
|00000300| 20 4d 61 6e 61 67 65 72 | 2c 20 61 6c 74 68 6f 75 | Manager|, althou|
|00000310| 67 68 20 6f 75 72 20 6c | 69 62 72 61 72 79 20 69 |gh our l|ibrary i|
|00000320| 73 20 65 61 73 69 65 72 | 20 74 6f 20 75 73 65 20 |s easier| to use |
|00000330| 61 6e 64 20 64 6f 65 73 | 20 61 20 6c 6f 74 20 6d |and does| a lot m|
|00000340| 6f 72 65 2e 0d 0d 50 6c | 65 61 73 65 20 6e 6f 74 |ore...Pl|ease not|
|00000350| 65 2c 20 68 6f 77 65 76 | 65 72 2c 20 74 68 61 74 |e, howev|er, that|
|00000360| 20 6f 75 72 20 6c 69 73 | 74 62 6f 78 20 6c 69 62 | our lis|tbox lib|
|00000370| 72 61 72 79 20 68 61 73 | 20 6e 6f 74 68 69 6e 67 |rary has| nothing|
|00000380| 20 74 6f 20 64 6f 20 77 | 69 74 68 20 74 68 65 20 | to do w|ith the |
|00000390| 6c 69 73 74 20 6d 61 6e | 61 67 65 72 3a 20 20 66 |list man|ager: f|
|000003a0| 6f 72 20 61 6e 79 20 67 | 69 76 65 6e 20 6c 69 73 |or any g|iven lis|
|000003b0| 74 2c 20 79 6f 75 20 6d | 75 73 74 20 75 73 65 20 |t, you m|ust use |
|000003c0| 41 70 70 6c 65 27 73 20 | 4c 69 73 74 20 4d 61 6e |Apple's |List Man|
|000003d0| 61 67 65 72 20 6f 72 20 | 74 68 65 20 66 75 6e 63 |ager or |the func|
|000003e0| 74 69 6f 6e 73 20 70 72 | 6f 76 69 64 65 64 20 68 |tions pr|ovided h|
|000003f0| 65 72 65 2c 20 6e 6f 74 | 20 62 6f 74 68 20 66 6f |ere, not| both fo|
|00000400| 72 20 74 68 65 20 73 61 | 6d 65 20 6c 69 73 74 2e |r the sa|me list.|
|00000410| 0d 0d 0d 43 72 65 61 74 | 69 6e 67 2c 20 4d 61 69 |...Creat|ing, Mai|
|00000420| 6e 74 61 69 6e 69 6e 67 | 20 61 6e 64 20 44 69 73 |ntaining| and Dis|
|00000430| 70 6f 73 69 6e 67 20 4c | 69 73 74 73 0d 0d 43 72 |posing L|ists..Cr|
|00000440| 65 61 74 69 6e 67 20 61 | 20 6e 65 77 20 6c 69 73 |eating a| new lis|
|00000450| 74 62 6f 78 20 73 69 6d | 70 6c 79 20 72 65 71 75 |tbox sim|ply requ|
|00000460| 69 72 65 73 20 79 6f 75 | 20 74 6f 20 6b 6e 6f 77 |ires you| to know|
|00000470| 20 77 68 65 72 65 20 69 | 6e 20 61 20 77 69 6e 64 | where i|n a wind|
|00000480| 6f 77 20 6f 72 20 64 69 | 61 6c 6f 67 20 79 6f 75 |ow or di|alog you|
|00000490| 20 77 61 6e 74 20 74 68 | 65 20 72 65 63 74 61 6e | want th|e rectan|
|000004a0| 67 6c 65 20 74 6f 20 62 | 65 20 61 6e 64 20 63 61 |gle to b|e and ca|
|000004b0| 6c 6c 69 6e 67 20 4c 69 | 73 74 62 6f 78 4e 65 77 |lling Li|stboxNew|
|000004c0| 2e 0d 0d 4c 69 73 74 62 | 6f 78 4e 65 77 20 77 69 |...Listb|oxNew wi|
|000004d0| 6c 6c 20 72 65 74 75 72 | 6e 20 61 20 48 61 6e 64 |ll retur|n a Hand|
|000004e0| 6c 65 20 77 68 69 63 68 | 20 79 6f 75 20 77 69 6c |le which| you wil|
|000004f0| 6c 20 70 61 73 73 20 74 | 6f 20 61 6c 6c 20 73 75 |l pass t|o all su|
|00000500| 62 73 65 71 75 65 6e 74 | 20 66 75 6e 63 74 69 6f |bsequent| functio|
|00000510| 6e 73 20 74 6f 20 6d 61 | 69 6e 74 61 69 6e 20 74 |ns to ma|intain t|
|00000520| 68 65 20 6c 69 73 74 2e | 0d 0d 54 68 65 20 66 69 |he list.|..The fi|
|00000530| 72 73 74 20 74 68 69 6e | 67 20 79 6f 75 20 77 69 |rst thin|g you wi|
|00000540| 6c 6c 20 70 72 6f 62 61 | 62 6c 79 20 64 6f 20 69 |ll proba|bly do i|
|00000550| 73 20 73 65 74 20 63 65 | 72 74 61 69 6e 20 6f 70 |s set ce|rtain op|
|00000560| 74 69 6f 6e 73 20 74 68 | 61 74 20 61 72 65 20 6e |tions th|at are n|
|00000570| 6f 74 20 73 65 74 20 61 | 73 20 61 20 64 65 66 61 |ot set a|s a defa|
|00000580| 75 6c 74 3b 20 74 68 65 | 6e 20 79 6f 75 20 6d 69 |ult; the|n you mi|
|00000590| 67 68 74 20 77 61 6e 74 | 20 74 6f 20 69 6e 73 65 |ght want| to inse|
|000005a0| 72 74 20 73 6f 6d 65 20 | 6e 65 77 20 6c 69 73 74 |rt some |new list|
|000005b0| 20 65 6c 65 6d 65 6e 74 | 73 20 28 74 65 78 74 29 | element|s (text)|
|000005c0| 2e 0d 0d 41 20 6c 69 73 | 74 20 69 73 20 6d 61 69 |...A lis|t is mai|
|000005d0| 6e 74 61 69 6e 65 64 20 | 75 73 69 6e 67 20 74 68 |ntained |using th|
|000005e0| 65 20 73 74 61 6e 64 61 | 72 64 20 65 76 65 6e 74 |e standa|rd event|
|000005f0| 2d 64 72 69 76 65 6e 20 | 69 6e 74 65 72 66 61 63 |-driven |interfac|
|00000600| 65 20 79 6f 75 27 72 65 | 20 61 6c 72 65 61 64 79 |e you're| already|
|00000610| 20 61 63 63 75 73 74 6f | 6d 20 74 6f 20 66 6f 72 | accusto|m to for|
|00000620| 20 4d 61 63 69 6e 74 6f | 73 68 20 61 70 70 6c 69 | Macinto|sh appli|
|00000630| 63 61 74 69 6f 6e 73 3a | 20 20 6c 69 73 74 73 20 |cations:| lists |
|00000640| 61 72 65 20 64 72 61 77 | 6e 20 64 75 72 69 6e 67 |are draw|n during|
|00000650| 20 61 6e 20 75 70 64 61 | 74 65 20 65 76 65 6e 74 | an upda|te event|
|00000660| 3b 20 20 6d 6f 75 73 65 | 20 63 6c 69 63 6b 73 20 |; mouse| clicks |
|00000670| 61 72 65 20 74 72 61 63 | 6b 65 64 20 69 6e 20 72 |are trac|ked in r|
|00000680| 65 73 70 6f 6e 73 65 20 | 74 6f 20 61 20 6d 6f 75 |esponse |to a mou|
|00000690| 73 65 44 6f 77 6e 20 65 | 76 65 6e 74 2c 20 61 6e |seDown e|vent, an|
|000006a0| 64 20 73 6f 20 6f 6e 2e | 0d 00 10 00 0d 00 00 00 |d so on.|........|
|000006b0| 11 00 0d 00 00 00 12 00 | 0d 00 00 00 65 00 0d 00 |........|....e...|
|000006c0| 00 00 66 00 0d 00 00 00 | a9 00 0d 00 00 00 aa 00 |..f.....|........|
|000006d0| 0d 00 00 01 2a 00 0d 00 | 00 01 2b 00 0d 00 00 01 |....*...|..+.....|
|000006e0| a9 00 0d 00 00 01 aa 00 | 0d 00 00 02 75 00 0d 00 |........|....u...|
|000006f0| 00 02 76 00 0d 00 00 02 | 77 00 0d 00 00 02 a1 00 |..v.....|w.......|
|00000700| 0d 00 00 02 a2 00 0d 00 | 00 03 26 00 0d 00 00 03 |........|..&.....|
|00000710| 27 00 0d 00 00 03 8d 00 | 0d 00 00 03 8e 00 0d 00 |'.......|........|
|00000720| 00 04 26 00 0d 00 00 04 | 27 00 0d 00 00 05 0d 00 |..&.....|'.......|
|00000730| 0d 00 00 0d 00 00 0d 59 | 6f 75 20 63 61 6e 20 61 |.......Y|ou can a|
|00000740| 6c 73 6f 20 63 75 73 74 | 6f 6d 69 7a 65 20 74 68 |lso cust|omize th|
|00000750| 65 20 61 70 70 65 61 72 | 61 6e 63 65 20 6f 66 20 |e appear|ance of |
|00000760| 61 20 6c 69 73 74 62 6f | 78 2e 0d 0d 0d 4c 69 73 |a listbo|x....Lis|
|00000770| 74 73 20 69 6e 20 44 69 | 61 6c 6f 67 73 0d 0d 54 |ts in Di|alogs..T|
|00000780| 68 65 20 61 73 73 75 6d | 70 74 69 6f 6e 20 69 73 |he assum|ption is|
|00000790| 20 6d 61 64 65 20 74 68 | 72 6f 75 67 68 6f 75 74 | made th|roughout|
|000007a0| 20 74 68 69 73 20 64 6f | 63 75 6d 65 6e 74 61 74 | this do|cumentat|
|000007b0| 69 6f 6e 20 74 68 61 74 | 20 79 6f 75 20 77 69 6c |ion that| you wil|
|000007c0| 6c 20 62 65 20 63 72 65 | 61 74 69 6e 67 20 61 20 |l be cre|ating a |
|000007d0| 6c 69 73 74 62 6f 78 20 | 77 69 74 68 69 6e 20 61 |listbox |within a|
|000007e0| 20 72 65 67 75 6c 61 72 | 20 77 69 6e 64 6f 77 20 | regular| window |
|000007f0| 61 6e 64 2f 6f 72 20 79 | 6f 75 20 77 61 6e 74 20 |and/or y|ou want |
|00000800| 74 6f 20 63 6f 6e 74 72 | 6f 6c 20 74 68 65 20 6c |to contr|ol the l|
|00000810| 69 73 74 62 6f 78 20 64 | 69 73 63 72 65 74 65 6c |istbox d|iscretel|
|00000820| 79 20 28 64 72 69 76 65 | 6e 20 77 69 74 68 20 65 |y (drive|n with e|
|00000830| 76 65 6e 74 73 29 2e 0d | 0d 48 6f 77 65 76 65 72 |vents)..|.However|
|00000840| 2c 20 61 20 6c 69 73 74 | 62 6f 78 20 63 61 6e 20 |, a list|box can |
|00000850| 62 65 20 70 6c 61 63 65 | 64 20 69 6e 20 61 20 6d |be place|d in a m|
|00000860| 6f 64 61 6c 20 64 69 61 | 6c 6f 67 20 d1 20 61 6e |odal dia|log . an|
|00000870| 64 20 61 6c 6c 20 74 68 | 65 20 65 76 65 6e 74 73 |d all th|e events|
|00000880| 20 68 61 6e 64 6c 65 64 | 20 66 6f 72 20 79 6f 75 | handled| for you|
|00000890| 20 d1 20 62 79 20 75 73 | 69 6e 67 20 74 68 65 20 | . by us|ing the |
|000008a0| 73 70 65 63 69 61 6c 20 | 64 69 61 6c 6f 67 2f 6c |special |dialog/l|
|000008b0| 69 73 74 20 75 74 69 6c | 69 74 69 65 73 20 69 6e |ist util|ities in|
|000008c0| 20 62 6f 74 5f 64 69 61 | 6c 6f 67 2e 63 20 61 6e | bot_dia|log.c an|
|000008d0| 64 20 62 6f 74 5f 64 69 | 61 6c 6f 67 5f 6c 69 73 |d bot_di|alog_lis|
|000008e0| 74 2e 63 2e 0d 0d 70 61 | 73 63 61 6c 20 6c 69 73 |t.c...pa|scal lis|
|000008f0| 74 62 6f 78 5f 68 61 6e | 64 6c 65 20 4c 69 73 74 |tbox_han|dle List|
|00000900| 62 6f 78 4e 65 77 28 63 | 6f 6e 73 74 20 57 69 6e |boxNew(c|onst Win|
|00000910| 64 6f 77 50 74 72 20 77 | 5f 70 74 72 2c 0d 09 63 |dowPtr w|_ptr,..c|
|00000920| 6f 6e 73 74 20 52 65 63 | 74 20 2a 62 6f 75 6e 64 |onst Rec|t *bound|
|00000930| 73 29 3b 0d 46 55 4e 43 | 54 49 4f 4e 20 4c 69 73 |s);.FUNC|TION Lis|
|00000940| 74 62 6f 78 4e 65 77 28 | 77 5f 70 74 72 3a 20 57 |tboxNew(|w_ptr: W|
|00000950| 69 6e 64 6f 77 50 74 72 | 3b 20 62 6f 75 6e 64 73 |indowPtr|; bounds|
|00000960| 3a 20 52 65 63 74 29 20 | 3a 20 6c 69 73 74 62 6f |: Rect) |: listbo|
|00000970| 78 5f 68 61 6e 64 6c 65 | 3b 0d 0d 0d 43 72 65 61 |x_handle|;...Crea|
|00000980| 74 65 73 20 61 20 6e 65 | 77 2c 20 65 6d 70 74 79 |tes a ne|w, empty|
|00000990| 20 6c 69 73 74 62 6f 78 | 20 69 6e 20 61 20 77 69 | listbox| in a wi|
|000009a0| 6e 64 6f 77 2e 0d 0d 54 | 68 69 73 20 66 75 6e 63 |ndow...T|his func|
|000009b0| 74 69 6f 6e 20 77 69 6c | 6c 20 72 65 74 75 72 6e |tion wil|l return|
|000009c0| 20 61 20 73 70 65 63 69 | 61 6c 20 48 61 6e 64 6c | a speci|al Handl|
|000009d0| 65 20 74 68 61 74 20 79 | 6f 75 20 77 69 6c 6c 20 |e that y|ou will |
|000009e0| 70 61 73 73 20 74 6f 20 | 74 68 65 20 6f 74 68 65 |pass to |the othe|
|000009f0| 72 20 6c 69 73 74 62 6f | 78 20 66 75 6e 63 74 69 |r listbo|x functi|
|00000a00| 6f 6e 73 2e 0d 00 01 00 | 0d 00 00 00 35 00 0d 00 |ons.....|....5...|
|00000a10| 00 00 36 00 0d 00 00 00 | 37 00 0d 00 00 00 48 00 |..6.....|7.....H.|
|00000a20| 0d 00 00 00 49 00 0d 00 | 00 01 02 00 0d 00 00 01 |....I...|........|
|00000a30| 03 00 0d 00 00 01 af 00 | 0d 00 00 01 b0 00 0d 00 |........|........|
|00000a40| 00 01 e8 00 0d 00 00 01 | e9 00 09 00 72 01 fe 00 |........|....r...|
|00000a50| 0d 00 00 02 44 00 0d 00 | 00 02 45 00 0d 00 00 02 |....D...|..E.....|
|00000a60| 46 00 0d 00 00 02 70 00 | 0d 00 00 02 71 00 0d 00 |F.....p.|....q...|
|00000a70| 00 02 cf 00 0d 00 00 00 | 02 d0 00 0d 00 00 0d 54 |........|.......T|
|00000a80| 68 65 20 6c 69 73 74 20 | 77 69 6c 6c 20 62 65 20 |he list |will be |
|00000a90| 63 72 65 61 74 65 64 20 | 77 69 74 68 20 61 20 76 |created |with a v|
|00000aa0| 65 72 74 69 63 61 6c 20 | 73 63 72 6f 6c 6c 62 61 |ertical |scrollba|
|00000ab0| 72 20 62 75 74 20 77 69 | 6c 6c 20 63 6f 6e 74 61 |r but wi|ll conta|
|00000ac0| 69 6e 20 6e 6f 20 64 61 | 74 61 20 65 6c 65 6d 65 |in no da|ta eleme|
|00000ad0| 6e 74 73 2e 0d 0d 54 68 | 65 20 77 5f 70 74 72 20 |nts...Th|e w_ptr |
|00000ae0| 70 61 72 61 6d 65 74 65 | 72 20 69 73 20 61 20 57 |paramete|r is a W|
|00000af0| 69 6e 64 6f 77 50 74 72 | 20 61 6e 64 20 6d 75 73 |indowPtr| and mus|
|00000b00| 74 20 62 65 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |t be the| window |
|00000b10| 79 6f 75 20 69 6e 74 65 | 6e 64 20 74 6f 20 64 69 |you inte|nd to di|
|00000b20| 73 70 6c 61 79 20 74 68 | 65 20 6c 69 73 74 62 6f |splay th|e listbo|
|00000b30| 78 20 69 6e 3b 20 20 77 | 68 65 6e 20 79 6f 75 20 |x in; w|hen you |
|00000b40| 64 72 61 77 20 74 68 65 | 20 6c 69 73 74 62 6f 78 |draw the| listbox|
|00000b50| 20 6c 61 74 65 72 20 6f | 6e 2c 20 69 74 20 77 69 | later o|n, it wi|
|00000b60| 6c 6c 20 61 6c 77 61 79 | 73 20 64 72 61 77 20 74 |ll alway|s draw t|
|00000b70| 6f 20 77 5f 70 74 72 20 | 72 65 67 61 72 64 6c 65 |o w_ptr |regardle|
|00000b80| 73 73 20 6f 66 20 77 68 | 61 74 20 77 69 6e 64 6f |ss of wh|at windo|
|00000b90| 77 20 69 73 20 66 72 6f | 6e 74 6d 6f 73 74 20 61 |w is fro|ntmost a|
|00000ba0| 6e 64 20 77 68 61 74 20 | 47 72 61 66 50 6f 72 74 |nd what |GrafPort|
|00000bb0| 20 69 73 20 73 65 74 20 | 61 74 20 74 68 61 74 20 | is set |at that |
|00000bc0| 74 69 6d 65 2e 0d 54 68 | 65 20 62 6f 75 6e 64 73 |time..Th|e bounds|
|00000bd0| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 74 68 | paramet|er is th|
|00000be0| 65 20 61 72 65 61 20 74 | 68 61 74 20 77 69 6c 6c |e area t|hat will|
|00000bf0| 20 64 69 73 70 6c 61 79 | 20 74 68 65 20 6c 69 73 | display| the lis|
|00000c00| 74 20 63 6f 6e 74 65 6e | 74 73 2e 0d 0d 00 01 00 |t conten|ts......|
|00000c10| 0d 00 00 00 57 00 0d 00 | 00 00 58 00 0d 00 00 01 |....W...|..X.....|
|00000c20| 48 00 0d 00 00 01 8e 00 | 0d 00 00 01 8f 00 0d 00 |H.......|........|
|00000c30| 00 41 20 6e 65 77 20 6c | 69 73 74 20 77 69 6c 6c |.A new l|ist will|
|00000c40| 20 6e 6f 74 20 73 68 6f | 77 20 75 70 20 75 6e 74 | not sho|w up unt|
|00000c50| 69 6c 20 79 6f 75 20 64 | 69 73 70 6c 61 79 20 69 |il you d|isplay i|
|00000c60| 74 20 28 75 73 69 6e 67 | 20 4c 69 73 74 62 6f 78 |t (using| Listbox|
|00000c70| 44 72 61 77 29 2e 20 20 | 54 79 70 69 63 61 6c 6c |Draw). |Typicall|
|00000c80| 79 2c 20 79 6f 75 20 63 | 72 65 61 74 65 20 61 20 |y, you c|reate a |
|00000c90| 6e 65 77 20 6c 69 73 74 | 62 6f 78 20 69 6e 20 61 |new list|box in a|
|00000ca0| 20 6e 65 77 20 77 69 6e | 64 6f 77 20 6f 72 20 64 | new win|dow or d|
|00000cb0| 69 61 6c 6f 67 20 61 6e | 64 20 64 72 61 77 20 74 |ialog an|d draw t|
|00000cc0| 68 65 20 6c 69 73 74 20 | 64 75 72 69 6e 67 20 61 |he list |during a|
|00000cd0| 6e 20 75 70 64 61 74 65 | 20 65 76 65 6e 74 2e 0d |n update| event..|
|00000ce0| 0d 44 65 66 61 75 6c 74 | 20 53 65 74 74 69 6e 67 |.Default| Setting|
|00000cf0| 73 0d 0d 4c 69 73 74 62 | 6f 78 65 73 20 61 72 65 |s..Listb|oxes are|
|00000d00| 20 63 72 65 61 74 65 64 | 20 77 69 74 68 20 63 65 | created| with ce|
|00000d10| 72 74 61 69 6e 20 64 65 | 66 61 75 6c 74 20 61 74 |rtain de|fault at|
|00000d20| 74 72 69 62 75 74 65 73 | 3b 20 20 69 66 20 79 6f |tributes|; if yo|
|00000d30| 75 20 77 61 6e 74 20 64 | 69 66 66 65 72 65 6e 74 |u want d|ifferent|
|00000d40| 20 61 74 74 72 69 62 75 | 74 65 73 20 79 6f 75 20 | attribu|tes you |
|00000d50| 6e 65 65 64 20 74 6f 20 | 63 61 6c 6c 20 74 68 65 |need to |call the|
|00000d60| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 66 75 6e | appropr|iate fun|
|00000d70| 63 74 69 6f 6e 28 73 29 | 20 74 6f 20 63 68 61 6e |ction(s)| to chan|
|00000d80| 67 65 20 74 68 65 6d 2e | 20 20 54 68 65 20 66 6f |ge them.| The fo|
|00000d90| 6c 6c 6f 77 69 6e 67 20 | 69 73 20 61 20 74 61 62 |llowing |is a tab|
|00000da0| 6c 65 20 73 68 6f 77 69 | 6e 67 20 74 68 65 73 65 |le showi|ng these|
|00000db0| 20 64 65 66 61 75 6c 74 | 20 73 65 74 74 69 6e 67 | default| setting|
|00000dc0| 73 3a 0d 0d 4c 69 73 74 | 62 6f 78 20 41 74 74 72 |s:..List|box Attr|
|00000dd0| 69 62 75 74 65 09 44 65 | 66 61 75 6c 74 20 53 65 |ibute.De|fault Se|
|00000de0| 74 74 69 6e 67 09 55 73 | 65 20 54 6f 20 43 68 61 |tting.Us|e To Cha|
|00000df0| 6e 67 65 0d 0d 46 6f 6e | 74 2f 73 74 79 6c 65 09 |nge..Fon|t/style.|
|00000e00| 43 68 69 63 61 67 6f 2c | 20 31 32 2d 70 74 2c 20 |Chicago,| 12-pt, |
|00000e10| 70 6c 61 69 6e 09 4c 69 | 73 74 62 6f 78 43 68 61 |plain.Li|stboxCha|
|00000e20| 6e 67 65 46 6f 6e 74 0d | 0d 43 6f 6c 6f 72 20 28 |ngeFont.|.Color (|
|00000e30| 66 6f 72 65 67 72 6f 75 | 6e 64 29 09 42 6c 61 63 |foregrou|nd).Blac|
|00000e40| 6b 09 4c 69 73 74 62 6f | 78 43 68 61 6e 67 65 43 |k.Listbo|xChangeC|
|00000e50| 6f 6c 6f 72 0d 0d 54 61 | 62 73 09 57 6f 6e 27 74 |olor..Ta|bs.Won't|
|00000e60| 20 75 73 65 20 74 61 62 | 73 09 4c 69 73 74 62 6f | use tab|s.Listbo|
|00000e70| 78 55 73 65 54 61 62 73 | 0d 0d 54 61 62 20 53 70 |xUseTabs|..Tab Sp|
|00000e80| 61 63 69 6e 67 09 33 30 | 20 70 69 78 65 6c 73 09 |acing.30| pixels.|
|00000e90| 4c 69 73 74 62 6f 78 53 | 65 74 54 61 62 56 61 6c |ListboxS|etTabVal|
|00000ea0| 75 65 0d 0d 45 6c 65 6d | 65 6e 74 20 73 65 6c 65 |ue..Elem|ent sele|
|00000eb0| 63 74 69 6f 6e 09 4f 6e | 6c 79 20 6f 6e 65 20 73 |ction.On|ly one s|
|00000ec0| 65 6c 65 63 74 65 64 20 | 61 74 20 61 20 74 69 6d |elected |at a tim|
|00000ed0| 65 09 4c 69 73 74 62 6f | 78 53 65 74 53 65 6c 65 |e.Listbo|xSetSele|
|00000ee0| 63 74 69 6f 6e 46 6c 61 | 67 0d 0d 0d 0d 0d 0d 0d |ctionFla|g.......|
|00000ef0| 0d 0d 54 68 65 20 69 6c | 6c 75 73 74 72 61 74 69 |..The il|lustrati|
|00000f00| 6f 6e 20 6f 6e 20 74 68 | 65 20 6c 65 66 74 20 73 |on on th|e left s|
|00000f10| 68 6f 77 73 20 77 68 65 | 72 65 20 74 68 65 20 73 |hows whe|re the s|
|00000f20| 63 72 6f 6c 6c 62 61 72 | 20 67 65 74 73 20 63 72 |crollbar| gets cr|
|00000f30| 65 61 74 65 64 20 77 69 | 74 68 20 72 65 73 70 65 |eated wi|th respe|
|00000f40| 63 74 20 74 6f 20 74 68 | 65 20 62 6f 75 6e 64 73 |ct to th|e bounds|
|00000f50| 20 72 65 63 74 61 6e 67 | 6c 65 20 6f 66 20 74 68 | rectang|le of th|
|00000f60| 65 20 6c 69 73 74 62 6f | 78 20 d1 20 74 68 65 20 |e listbo|x . the |
|00000f70| 73 63 72 6f 6c 6c 62 61 | 72 20 69 73 20 61 6c 77 |scrollba|r is alw|
|00000f80| 61 79 73 20 70 6c 61 63 | 65 64 20 6f 6e 20 74 68 |ays plac|ed on th|
|00000f90| 65 20 72 69 67 68 74 20 | 65 64 67 65 2e 0d 00 af |e right |edge....|
|00000fa0| 00 0d 00 00 00 b0 00 0d | 00 00 00 c1 00 0d 00 00 |........|........|
|00000fb0| 00 c2 00 0d 00 00 01 92 | 00 0d 00 00 01 93 00 0d |........|........|
|00000fc0| 00 00 01 a5 00 09 00 11 | 01 b5 00 09 00 5f 01 c3 |........|....._..|
|00000fd0| 00 0d 00 00 01 c4 00 0d | 00 00 01 cf 00 09 00 43 |........|.......C|
|00000fe0| 01 e5 00 09 00 4f 01 f7 | 00 0d 00 00 01 f8 00 0d |.....O..|........|
|00000ff0| 00 00 02 0b 00 09 00 17 | 02 11 00 09 00 99 02 24 |........|.......$|
|00001000| 00 0d 00 00 02 25 00 0d | 00 00 02 2a 00 09 00 5b |.....%..|...*...[|
|00001010| 02 39 00 09 00 6d 02 48 | 00 0d 00 00 02 49 00 0d |.9...m.H|.....I..|
|00001020| 00 00 02 55 00 09 00 37 | 02 5f 00 09 00 89 02 72 |...U...7|._.....r|
|00001030| 00 0d 00 00 02 73 00 0d | 00 00 02 85 00 09 00 20 |.....s..|....... |
|00001040| 02 a1 00 09 00 37 02 b9 | 00 0d 00 00 02 ba 00 0d |.....7..|........|
|00001050| 00 00 02 bb 00 0d 00 00 | 02 bc 00 0d 00 00 02 bd |........|........|
|00001060| 00 0d 00 00 02 be 00 0d | 00 00 02 bf 00 0d 00 00 |........|........|
|00001070| 02 c0 00 0d 00 00 02 c1 | 00 0d 00 00 03 6d 00 0d |........|.....m..|
|00001080| 00 00 0d 0d 0d 0d 0d 0c | 0d 53 65 6c 65 63 74 69 |........|.Selecti|
|00001090| 6f 6e 0d 0d 70 61 73 63 | 61 6c 20 76 6f 69 64 20 |on..pasc|al void |
|000010a0| 4c 69 73 74 62 6f 78 53 | 65 74 53 65 6c 65 63 74 |ListboxS|etSelect|
|000010b0| 69 6f 6e 46 6c 61 67 28 | 63 6f 6e 73 74 20 6c 69 |ionFlag(|const li|
|000010c0| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 20 6c 69 73 |stbox_ha|ndle lis|
|000010d0| 74 2c 0d 09 6c 69 73 74 | 62 6f 78 5f 66 6c 61 67 |t,..list|box_flag|
|000010e0| 73 20 6e 65 77 5f 66 6c | 61 67 29 3b 0d 70 61 73 |s new_fl|ag);.pas|
|000010f0| 63 61 6c 20 6c 69 73 74 | 62 6f 78 5f 66 6c 61 67 |cal list|box_flag|
|00001100| 73 20 4c 69 73 74 62 6f | 78 47 65 74 53 65 6c 65 |s Listbo|xGetSele|
|00001110| 63 74 69 6f 6e 46 6c 61 | 67 28 63 6f 6e 73 74 20 |ctionFla|g(const |
|00001120| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 20 09 |listbox_|handle .|
|00001130| 09 6c 69 73 74 29 3b 0d | 50 52 4f 43 45 44 55 52 |.list);.|PROCEDUR|
|00001140| 45 20 4c 69 73 74 62 6f | 78 53 65 74 53 65 6c 65 |E Listbo|xSetSele|
|00001150| 63 74 69 6f 6e 46 6c 61 | 67 28 6c 69 73 74 3a 20 |ctionFla|g(list: |
|00001160| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 3b 0d |listbox_|handle;.|
|00001170| 09 6e 65 77 5f 66 6c 61 | 67 3a 20 49 4e 54 45 47 |.new_fla|g: INTEG|
|00001180| 45 52 29 3b 0d 46 55 4e | 43 54 49 4f 4e 20 4c 69 |ER);.FUN|CTION Li|
|00001190| 73 74 62 6f 78 47 65 74 | 53 65 6c 65 63 74 69 6f |stboxGet|Selectio|
|000011a0| 6e 46 6c 61 67 28 6c 69 | 73 74 3a 20 6c 69 73 74 |nFlag(li|st: list|
|000011b0| 62 6f 78 5f 68 61 6e 64 | 6c 65 29 20 3a 20 49 4e |box_hand|le) : IN|
|000011c0| 54 45 47 45 52 3b 0d 0d | 45 6e 61 62 6c 65 73 20 |TEGER;..|Enables |
|000011d0| 6f 72 20 64 69 73 61 62 | 6c 65 73 20 61 20 6c 69 |or disab|les a li|
|000011e0| 73 74 20 74 6f 20 61 6c | 6c 6f 77 20 6d 6f 72 65 |st to al|low more|
|000011f0| 20 74 68 61 6e 20 6f 6e | 65 20 65 6c 65 6d 65 6e | than on|e elemen|
|00001200| 74 20 74 6f 20 62 65 20 | 73 65 6c 65 63 74 65 64 |t to be |selected|
|00001210| 20 61 74 20 61 20 74 69 | 6d 65 2e 0d 0d 57 68 65 | at a ti|me...Whe|
|00001220| 6e 20 61 20 6e 65 77 20 | 6c 69 73 74 62 6f 78 20 |n a new |listbox |
|00001230| 69 73 20 63 72 65 61 74 | 65 64 2c 20 69 74 73 20 |is creat|ed, its |
|00001240| 64 65 66 61 75 6c 74 20 | 73 65 6c 65 63 74 69 6f |default |selectio|
|00001250| 6e 20 6d 6f 64 65 20 64 | 6f 65 73 20 6e 6f 74 20 |n mode d|oes not |
|00001260| 61 6c 6c 6f 77 20 6d 6f | 72 65 20 74 68 61 6e 20 |allow mo|re than |
|00001270| 6f 6e 65 20 6c 69 73 74 | 20 65 6c 65 6d 65 6e 74 |one list| element|
|00001280| 20 74 6f 20 62 65 20 73 | 65 6c 65 63 74 65 64 20 | to be s|elected |
|00001290| 61 74 20 74 68 65 20 73 | 61 6d 65 20 74 69 6d 65 |at the s|ame time|
|000012a0| 2e 20 20 49 66 20 74 68 | 69 73 20 69 73 20 74 68 |. If th|is is th|
|000012b0| 65 20 6d 6f 64 65 20 79 | 6f 75 20 70 72 65 66 65 |e mode y|ou prefe|
|000012c0| 72 20 66 6f 72 20 79 6f | 75 72 20 6c 69 73 74 2c |r for yo|ur list,|
|000012d0| 20 79 6f 75 20 64 6f 20 | 6e 6f 74 20 6e 65 65 64 | you do |not need|
|000012e0| 20 74 6f 20 75 73 65 20 | 4c 69 73 74 62 6f 78 53 | to use |ListboxS|
|000012f0| 65 74 53 65 6c 65 63 74 | 69 6f 6e 46 6c 61 67 2e |etSelect|ionFlag.|
|00001300| 0d 0d 0d 54 6f 20 65 6e | 61 62 6c 65 20 6f 72 20 |...To en|able or |
|00001310| 64 69 73 61 62 6c 65 20 | 74 68 65 20 73 65 6c 65 |disable |the sele|
|00001320| 63 74 69 6f 6e 20 6d 6f | 64 65 20 66 6f 72 20 61 |ction mo|de for a|
|00001330| 20 6c 69 73 74 2c 20 75 | 73 65 20 4c 69 73 74 62 | list, u|se Listb|
|00001340| 6f 78 53 65 74 53 65 6c | 65 63 74 69 6f 6e 46 6c |oxSetSel|ectionFl|
|00001350| 61 67 20 66 6f 72 20 6c | 69 73 74 20 61 6e 64 20 |ag for l|ist and |
|00001360| 70 61 73 73 20 6f 6e 65 | 20 6f 66 20 74 68 65 20 |pass one| of the |
|00001370| 66 6f 6c 6c 6f 77 69 6e | 67 20 76 61 6c 75 65 73 |followin|g values|
|00001380| 20 69 6e 20 6e 65 77 5f | 66 6c 61 67 3a 0d 0d 0d | in new_|flag:...|
|00001390| 32 09 6c 69 73 74 62 6f | 78 5f 6f 6e 6c 79 5f 6f |2.listbo|x_only_o|
|000013a0| 6e 65 09 6f 6e 6c 79 20 | 61 6c 6c 6f 77 20 6f 6e |ne.only |allow on|
|000013b0| 65 20 65 6c 65 6d 65 6e | 74 20 74 6f 20 62 65 20 |e elemen|t to be |
|000013c0| 73 65 6c 65 63 74 65 64 | 20 61 74 20 61 20 74 69 |selected| at a ti|
|000013d0| 6d 65 0d 34 09 6c 69 73 | 74 62 6f 78 5f 73 65 6c |me.4.lis|tbox_sel|
|000013e0| 65 63 74 5f 6d 75 6c 74 | 69 70 6c 65 09 6d 75 6c |ect_mult|iple.mul|
|000013f0| 74 69 70 6c 65 20 65 6c | 65 6d 65 6e 74 73 20 63 |tiple el|ements c|
|00001400| 61 6e 20 62 65 20 73 65 | 6c 65 63 74 65 64 0d 0d |an be se|lected..|
|00001410| 4c 69 73 74 73 20 74 68 | 61 74 20 61 72 65 20 73 |Lists th|at are s|
|00001420| 65 74 20 66 6f 72 20 6c | 69 73 74 62 6f 78 5f 73 |et for l|istbox_s|
|00001430| 65 6c 65 63 74 5f 6d 75 | 6c 74 69 70 6c 65 20 77 |elect_mu|ltiple w|
|00001440| 69 6c 6c 20 61 6c 6c 6f | 77 20 22 73 68 69 66 74 |ill allo|w "shift|
|00001450| 2d 63 6c 69 63 6b 22 20 | 65 78 74 65 6e 73 69 6f |-click" |extensio|
|00001460| 6e 73 20 69 6e 20 4c 69 | 73 74 62 6f 78 43 6c 69 |ns in Li|stboxCli|
|00001470| 63 6b 20 28 63 61 75 73 | 69 6e 67 20 61 20 73 65 |ck (caus|ing a se|
|00001480| 6c 65 63 74 69 6f 6e 20 | 72 61 6e 67 65 29 20 61 |lection |range) a|
|00001490| 6e 64 20 77 69 6c 6c 20 | 63 61 75 73 65 20 61 6c |nd will |cause al|
|000014a0| 6c 20 65 6c 65 6d 65 6e | 74 73 20 74 6f 20 72 65 |l elemen|ts to re|
|000014b0| 74 61 69 6e 20 74 68 65 | 69 72 20 73 65 6c 65 63 |tain the|ir selec|
|000014c0| 74 69 6f 6e 20 73 74 61 | 74 75 73 20 77 68 65 6e |tion sta|tus when|
|000014d0| 65 76 65 72 20 79 6f 75 | 20 75 73 65 20 4c 69 73 |ever you| use Lis|
|000014e0| 74 62 6f 78 53 65 6c 65 | 63 74 45 6c 65 6d 65 6e |tboxSele|ctElemen|
|000014f0| 74 2e 20 20 41 64 64 69 | 74 69 6f 6e 61 6c 6c 79 |t. Addi|tionally|
|00001500| 2c 20 61 20 22 63 6f 6d | 6d 61 6e 64 2d 63 6c 69 |, a "com|mand-cli|
|00001510| 63 6b 22 20 77 69 6c 6c | 20 63 61 75 73 65 20 64 |ck" will| cause d|
|00001520| 69 73 63 6f 6e 74 69 67 | 75 6f 75 73 20 73 65 6c |iscontig|uous sel|
|00001530| 65 63 74 69 6f 6e 73 20 | 28 72 61 6e 64 6f 6d 20 |ections |(random |
|00001540| 65 6c 65 6d 65 6e 74 73 | 20 73 65 6c 65 63 74 65 |elements| selecte|
|00001550| 64 20 61 74 20 6f 6e 65 | 20 74 69 6d 65 29 2e 0d |d at one| time)..|
|00001560| 00 01 00 0d 00 00 00 02 | 00 0d 00 00 00 03 00 0d |........|........|
|00001570| 00 00 00 04 00 0d 00 00 | 00 05 00 0d 00 00 00 06 |........|........|
|00001580| 00 0c 00 00 00 07 00 0d | 00 00 00 11 00 0d 00 00 |........|........|
|00001590| 00 12 00 0d 00 00 00 51 | 00 0d 00 00 00 52 00 09 |.......Q|.....R..|
|000015a0| 00 72 00 6b 00 0d 00 00 | 00 ae 00 09 00 0d 00 af |.r.k....|........|
|000015b0| 00 09 00 72 00 b6 00 0d | 00 00 00 ee 00 0d 00 00 |...r....|........|
|000015c0| 00 ef 00 09 00 72 01 03 | 00 0d 00 00 01 45 00 0d |.....r..|.....E..|
|000015d0| 00 00 01 46 00 0d 00 00 | 01 9a 00 0d 00 00 01 9b |...F....|........|
|000015e0| 00 0d 00 00 02 7f 00 0d | 00 00 02 80 00 0d 00 00 |........|........|
|000015f0| 02 81 00 0d 00 00 03 0c | 00 0d 00 00 03 0d 00 0d |........|........|
|00001600| 00 00 03 0e 00 0d 00 00 | 03 10 00 09 00 2d 03 21 |........|.....-.!|
|00001610| 00 09 00 39 03 51 00 0d | 00 00 03 53 00 09 00 2d |...9.Q..|...S...-|
|00001620| 03 6b 00 09 00 0f 03 8d | 00 0d 00 00 03 8e 00 0d |.k......|........|
|00001630| 00 00 04 de 00 0d 00 00 | 0d 0d 4d 61 72 6b 73 0d |........|..Marks.|
|00001640| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 4c 69 73 |.pascal |void Lis|
|00001650| 74 62 6f 78 55 73 65 4d | 61 72 6b 73 28 6c 69 73 |tboxUseM|arks(lis|
|00001660| 74 62 6f 78 5f 68 61 6e | 64 6c 65 20 6c 69 73 74 |tbox_han|dle list|
|00001670| 29 3b 0d 70 61 73 63 61 | 6c 20 76 6f 69 64 20 4c |);.pasca|l void L|
|00001680| 69 73 74 62 6f 78 44 6f | 6e 74 55 73 65 4d 61 72 |istboxDo|ntUseMar|
|00001690| 6b 73 28 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |ks(listb|ox_handl|
|000016a0| 65 20 6c 69 73 74 29 3b | 0d 50 52 4f 43 45 44 55 |e list);|.PROCEDU|
|000016b0| 52 45 20 4c 69 73 74 62 | 6f 78 55 73 65 4d 61 72 |RE Listb|oxUseMar|
|000016c0| 6b 73 28 6c 69 73 74 3a | 20 6c 69 73 74 62 6f 78 |ks(list:| listbox|
|000016d0| 5f 68 61 6e 64 6c 65 29 | 3b 0d 50 52 4f 43 45 44 |_handle)|;.PROCED|
|000016e0| 55 52 45 20 4c 69 73 74 | 62 6f 78 44 6f 6e 74 55 |URE List|boxDontU|
|000016f0| 73 65 4d 61 72 6b 73 28 | 6c 69 73 74 3a 20 6c 69 |seMarks(|list: li|
|00001700| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 29 3b 0d 0d |stbox_ha|ndle);..|
|00001710| 45 6e 61 62 6c 65 73 2f | 64 69 73 61 62 6c 65 73 |Enables/|disables|
|00001720| 20 74 68 65 20 75 73 61 | 67 65 20 6f 66 20 65 6c | the usa|ge of el|
|00001730| 65 6d 65 6e 74 20 6d 61 | 72 6b 73 20 66 6f 72 20 |ement ma|rks for |
|00001740| 61 20 6c 69 73 74 2e 0d | 0d 41 6e 20 65 6c 65 6d |a list..|.An elem|
|00001750| 65 6e 74 20 6d 61 72 6b | 20 69 73 20 61 20 63 68 |ent mark| is a ch|
|00001760| 61 72 61 63 74 65 72 20 | 74 68 61 74 20 69 73 20 |aracter |that is |
|00001770| 64 72 61 77 6e 20 74 6f | 20 74 68 65 20 6c 65 66 |drawn to| the lef|
|00001780| 74 20 6f 66 20 61 20 6c | 69 73 74 20 65 6c 65 6d |t of a l|ist elem|
|00001790| 65 6e 74 2e 20 20 54 68 | 65 20 74 79 70 69 63 61 |ent. Th|e typica|
|000017a0| 6c 20 75 73 65 20 66 6f | 72 20 61 6e 20 65 6c 65 |l use fo|r an ele|
|000017b0| 6d 65 6e 74 20 6d 61 72 | 6b 20 69 73 20 74 6f 20 |ment mar|k is to |
|000017c0| 22 63 68 65 63 6b 6d 61 | 72 6b 22 20 6f 6e 65 20 |"checkma|rk" one |
|000017d0| 6f 72 20 6d 6f 72 65 20 | 69 74 65 6d 73 20 69 6e |or more |items in|
|000017e0| 20 61 20 6c 69 73 74 2c | 20 61 6c 74 68 6f 75 67 | a list,| althoug|
|000017f0| 68 20 74 68 65 20 6d 61 | 72 6b 20 63 68 61 72 61 |h the ma|rk chara|
|00001800| 63 74 65 72 20 63 61 6e | 20 62 65 20 61 6e 79 20 |cter can| be any |
|00001810| 70 72 69 6e 74 61 62 6c | 65 20 63 68 61 72 61 63 |printabl|e charac|
|00001820| 74 65 72 2e 0d 0d 42 79 | 20 64 65 66 61 75 6c 74 |ter...By| default|
|00001830| 2c 20 61 20 6e 65 77 6c | 79 20 63 72 65 61 74 65 |, a newl|y create|
|00001840| 64 20 6c 69 73 74 20 77 | 69 6c 6c 20 6e 6f 74 20 |d list w|ill not |
|00001850| 61 6c 6c 6f 77 20 74 68 | 65 20 75 73 65 20 6f 66 |allow th|e use of|
|00001860| 20 65 6c 65 6d 65 6e 74 | 20 6d 61 72 6b 73 2e 20 | element| marks. |
|00001870| 20 54 6f 20 63 68 61 6e | 67 65 20 74 68 69 73 2c | To chan|ge this,|
|00001880| 20 63 61 6c 6c 20 4c 69 | 73 74 62 6f 78 55 73 65 | call Li|stboxUse|
|00001890| 4d 61 72 6b 73 20 61 6e | 64 20 70 61 73 73 20 79 |Marks an|d pass y|
|000018a0| 6f 75 72 20 6c 69 73 74 | 5f 68 61 6e 64 6c 65 20 |our list|_handle |
|000018b0| 69 6e 20 6c 69 73 74 2e | 0d 0d 49 66 20 66 6f 72 |in list.|..If for|
|000018c0| 20 73 6f 6d 65 20 72 65 | 61 73 6f 6e 20 79 6f 75 | some re|ason you|
|000018d0| 20 77 61 6e 74 20 74 6f | 20 72 65 76 65 72 74 20 | want to| revert |
|000018e0| 74 6f 20 74 68 65 20 64 | 65 66 61 75 6c 74 20 6d |to the d|efault m|
|000018f0| 6f 64 65 20 28 74 6f 20 | 6e 6f 74 20 75 73 65 20 |ode (to |not use |
|00001900| 65 6c 65 6d 65 6e 74 20 | 6d 61 72 6b 73 29 2c 20 |element |marks), |
|00001910| 63 61 6c 6c 20 4c 69 73 | 74 62 6f 78 44 6f 6e 74 |call Lis|tboxDont|
|00001920| 55 73 65 4d 61 72 6b 73 | 20 66 6f 72 20 6c 69 73 |UseMarks| for lis|
|00001930| 74 2e 0d 00 01 00 0d 00 | 00 00 02 00 0d 00 00 00 |t.......|........|
|00001940| 08 00 0d 00 00 00 09 00 | 0d 00 00 00 3b 00 0d 00 |........|....;...|
|00001950| 00 00 71 00 0d 00 00 00 | a2 00 0d 00 00 00 d7 00 |..q.....|........|
|00001960| 0d 00 00 00 d8 00 0d 00 | 00 01 10 00 0d 00 00 01 |........|........|
|00001970| 11 00 0d 00 00 01 ed 00 | 0d 00 00 01 ee 00 0d 00 |........|........|
|00001980| 00 02 81 00 0d 00 00 02 | 82 00 0d 00 00 02 fb 00 |........|........|
|00001990| 0d 00 00 0d 57 68 65 6e | 20 74 68 65 20 75 73 65 |....When| the use|
|000019a0| 20 6f 66 20 65 6c 65 6d | 65 6e 74 20 6d 61 72 6b | of elem|ent mark|
|000019b0| 73 20 69 73 20 65 6e 61 | 62 6c 65 64 2c 20 61 6c |s is ena|bled, al|
|000019c0| 6c 20 6c 69 73 74 20 69 | 74 65 6d 73 20 77 69 6c |l list i|tems wil|
|000019d0| 6c 20 64 72 61 77 20 77 | 69 74 68 20 61 20 73 75 |l draw w|ith a su|
|000019e0| 66 66 69 63 69 65 6e 74 | 20 6c 65 66 74 20 69 6e |fficient| left in|
|000019f0| 64 65 6e 74 20 74 6f 20 | 61 63 63 6f 6d 6d 6f 64 |dent to |accommod|
|00001a00| 61 74 65 20 74 68 65 20 | 64 72 61 77 69 6e 67 20 |ate the |drawing |
|00001a10| 6f 66 20 61 20 6d 61 72 | 6b 2e 0d 0d 45 6c 65 6d |of a mar|k...Elem|
|00001a20| 65 6e 74 20 6d 61 72 6b | 73 20 61 72 65 20 64 72 |ent mark|s are dr|
|00001a30| 61 77 6e 20 69 6e 20 61 | 20 66 6f 6e 74 20 61 6e |awn in a| font an|
|00001a40| 64 20 73 74 79 6c 65 20 | 69 6e 64 65 70 65 6e 64 |d style |independ|
|00001a50| 65 6e 74 20 6f 66 20 74 | 68 65 20 66 6f 6e 74 2f |ent of t|he font/|
|00001a60| 73 74 79 6c 65 20 66 6f | 72 20 74 68 65 20 64 61 |style fo|r the da|
|00001a70| 74 61 20 65 6c 65 6d 65 | 6e 74 73 3b 20 74 68 65 |ta eleme|nts; the|
|00001a80| 79 20 63 61 6e 20 61 6c | 73 6f 20 62 65 20 61 6e |y can al|so be an|
|00001a90| 79 20 70 72 69 6e 74 61 | 62 6c 65 20 63 68 61 72 |y printa|ble char|
|00001aa0| 61 63 74 65 72 2e 20 0d | 0d 09 55 73 65 73 20 65 |acter. .|..Uses e|
|00001ab0| 6c 65 6d 65 6e 74 20 6d | 61 72 6b 73 09 44 6f 65 |lement m|arks.Doe|
|00001ac0| 73 20 6e 6f 74 20 75 73 | 65 20 65 6c 65 6d 65 6e |s not us|e elemen|
|00001ad0| 74 20 6d 61 72 6b 73 0d | 0d 0d 0d 14 0d 0d 0d 0d |t marks.|........|
|00001ae0| 0d 0d 0d 0d 0d 0d 0d 0d | 0d 0d 0d 54 61 62 73 0d |........|...Tabs.|
|00001af0| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 4c 69 73 |.pascal |void Lis|
|00001b00| 74 62 6f 78 55 73 65 54 | 61 62 73 28 6c 69 73 74 |tboxUseT|abs(list|
|00001b10| 62 6f 78 5f 68 61 6e 64 | 6c 65 20 6c 69 73 74 29 |box_hand|le list)|
|00001b20| 3b 0d 70 61 73 63 61 6c | 20 76 6f 69 64 20 4c 69 |;.pascal| void Li|
|00001b30| 73 74 62 6f 78 44 6f 6e | 74 55 73 65 54 61 62 73 |stboxDon|tUseTabs|
|00001b40| 28 6c 69 73 74 62 6f 78 | 5f 68 61 6e 64 6c 65 20 |(listbox|_handle |
|00001b50| 6c 69 73 74 29 3b 0d 50 | 52 4f 43 45 44 55 52 45 |list);.P|ROCEDURE|
|00001b60| 20 4c 69 73 74 62 6f 78 | 55 73 65 54 61 62 73 28 | Listbox|UseTabs(|
|00001b70| 6c 69 73 74 3a 20 6c 69 | 73 74 62 6f 78 5f 68 61 |list: li|stbox_ha|
|00001b80| 6e 64 6c 65 29 3b 0d 50 | 52 4f 43 45 44 55 52 45 |ndle);.P|ROCEDURE|
|00001b90| 20 4c 69 73 74 62 6f 78 | 44 6f 6e 74 55 73 65 54 | Listbox|DontUseT|
|00001ba0| 61 62 73 28 6c 69 73 74 | 3a 20 6c 69 73 74 62 6f |abs(list|: listbo|
|00001bb0| 78 5f 68 61 6e 64 6c 65 | 29 3b 0d 0d 45 6e 61 62 |x_handle|);..Enab|
|00001bc0| 6c 65 73 2f 64 69 73 61 | 62 6c 65 73 20 74 68 65 |les/disa|bles the|
|00001bd0| 20 75 73 65 20 6f 66 20 | 74 61 62 20 63 68 61 72 | use of |tab char|
|00001be0| 61 63 74 65 72 73 20 28 | 61 6e 64 20 74 61 62 20 |acters (|and tab |
|00001bf0| 73 70 61 63 69 6e 67 29 | 20 69 6e 20 61 20 6c 69 |spacing)| in a li|
|00001c00| 73 74 2e 0d 00 01 00 0d | 00 00 00 88 00 0d 00 00 |st......|........|
|00001c10| 00 89 00 0d 00 00 01 15 | 00 0d 00 00 01 16 00 0d |........|........|
|00001c20| 00 00 01 17 00 09 00 3a | 01 2a 00 09 00 3e 01 45 |.......:|.*...>.E|
|00001c30| 00 0d 00 00 01 46 00 0d | 00 00 01 47 00 0d 00 00 |.....F..|...G....|
|00001c40| 01 48 00 0d 00 00 01 4a | 00 0d 00 00 01 4b 00 0d |.H.....J|.....K..|
|00001c50| 00 00 01 4c 00 0d 00 00 | 01 4d 00 0d 00 00 01 4e |...L....|.M.....N|
|00001c60| 00 0d 00 00 01 4f 00 0d | 00 00 01 50 00 0d 00 00 |.....O..|...P....|
|00001c70| 01 51 00 0d 00 00 01 52 | 00 0d 00 00 01 53 00 0d |.Q.....R|.....S..|
|00001c80| 00 00 01 54 00 0d 00 00 | 01 55 00 0d 00 00 01 56 |...T....|.U.....V|
|00001c90| 00 0d 00 00 01 57 00 0d | 00 00 01 58 00 0d 00 00 |.....W..|...X....|
|00001ca0| 01 5d 00 0d 00 00 01 5e | 00 0d 00 00 01 8f 00 0d |.].....^|........|
|00001cb0| 00 00 01 c4 00 0d 00 00 | 01 f4 00 0d 00 00 02 28 |........|.......(|
|00001cc0| 00 0d 00 00 02 29 00 0d | 00 00 02 71 00 0d 00 00 |.....)..|...q....|
|00001cd0| 0d 42 79 20 64 65 66 61 | 75 6c 74 2c 20 61 20 6e |.By defa|ult, a n|
|00001ce0| 65 77 6c 79 20 63 72 65 | 61 74 65 64 20 6c 69 73 |ewly cre|ated lis|
|00001cf0| 74 20 77 69 6c 6c 20 6e | 6f 74 20 61 6c 6c 6f 77 |t will n|ot allow|
|00001d00| 20 74 68 65 20 75 73 65 | 20 6f 66 20 74 61 62 20 | the use| of tab |
|00001d10| 63 68 61 72 61 63 74 65 | 72 73 2c 20 77 68 69 63 |characte|rs, whic|
|00001d20| 68 20 69 6e 63 6c 75 64 | 65 73 20 61 75 74 6f 2d |h includ|es auto-|
|00001d30| 69 6e 64 65 6e 74 69 6e | 67 20 66 6f 72 20 74 61 |indentin|g for ta|
|00001d40| 62 73 2e 20 20 54 6f 20 | 63 68 61 6e 67 65 20 74 |bs. To |change t|
|00001d50| 68 69 73 2c 20 63 61 6c | 6c 20 4c 69 73 74 62 6f |his, cal|l Listbo|
|00001d60| 78 55 73 65 54 61 62 73 | 20 61 6e 64 20 70 61 73 |xUseTabs| and pas|
|00001d70| 73 20 79 6f 75 72 20 6c | 69 73 74 5f 68 61 6e 64 |s your l|ist_hand|
|00001d80| 6c 65 20 69 6e 20 6c 69 | 73 74 2e 0d 0d 49 66 20 |le in li|st...If |
|00001d90| 66 6f 72 20 73 6f 6d 65 | 20 72 65 61 73 6f 6e 20 |for some| reason |
|00001da0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 72 65 76 65 |you want| to reve|
|00001db0| 72 74 20 74 6f 20 74 68 | 65 20 64 65 66 61 75 6c |rt to th|e defaul|
|00001dc0| 74 20 6d 6f 64 65 20 28 | 74 6f 20 6e 6f 74 20 75 |t mode (|to not u|
|00001dd0| 73 65 20 74 61 62 73 29 | 2c 20 63 61 6c 6c 20 4c |se tabs)|, call L|
|00001de0| 69 73 74 62 6f 78 44 6f | 6e 74 55 73 65 54 61 62 |istboxDo|ntUseTab|
|00001df0| 73 20 66 6f 72 20 6c 69 | 73 74 2e 0d 0d 57 68 65 |s for li|st...Whe|
|00001e00| 6e 20 74 68 65 20 75 73 | 65 20 6f 66 20 74 61 62 |n the us|e of tab|
|00001e10| 73 20 69 73 20 65 6e 61 | 62 6c 65 64 2c 20 61 20 |s is ena|bled, a |
|00001e20| 6c 69 73 74 20 77 69 6c | 6c 20 22 74 61 62 20 6f |list wil|l "tab o|
|00001e30| 75 74 22 20 66 6f 72 20 | 61 6c 6c 20 74 61 62 20 |ut" for |all tab |
|00001e40| 63 68 61 72 61 63 74 65 | 72 73 20 74 68 61 74 20 |characte|rs that |
|00001e50| 61 72 65 20 69 6e 20 74 | 68 65 20 64 61 74 61 20 |are in t|he data |
|00001e60| 65 6c 65 6d 65 6e 74 3b | 20 20 69 66 20 74 61 62 |element;| if tab|
|00001e70| 73 20 61 72 65 20 6e 6f | 74 20 65 6e 61 62 6c 65 |s are no|t enable|
|00001e80| 64 2c 20 61 20 74 61 62 | 20 63 68 61 72 61 63 74 |d, a tab| charact|
|00001e90| 65 72 20 77 6f 6e 27 74 | 20 63 61 75 73 65 20 74 |er won't| cause t|
|00001ea0| 68 69 73 20 74 6f 20 68 | 61 70 70 65 6e 2e 0d 0d |his to h|appen...|
|00001eb0| 00 01 00 0d 00 00 00 bc | 00 0d 00 00 00 bd 00 0d |........|........|
|00001ec0| 00 00 01 2c 00 0d 00 00 | 01 2d 00 0d 00 00 01 df |...,....|.-......|
|00001ed0| 00 0d 00 00 01 e0 00 0d | 00 00 0d 09 44 6f 65 73 |........|....Does|
|00001ee0| 20 6e 6f 74 20 75 73 65 | 20 74 61 62 73 09 55 73 | not use| tabs.Us|
|00001ef0| 65 73 20 74 61 62 73 0d | 0d 0d 0d 0d 0d 0d 0d 0d |es tabs.|........|
|00001f00| 0d 0d 0d 0d 0d 70 61 73 | 63 61 6c 20 76 6f 69 64 |.....pas|cal void|
|00001f10| 20 4c 69 73 74 62 6f 78 | 53 65 74 54 61 62 56 61 | Listbox|SetTabVa|
|00001f20| 6c 75 65 28 63 6f 6e 73 | 74 20 6c 69 73 74 62 6f |lue(cons|t listbo|
|00001f30| 78 5f 68 61 6e 64 6c 65 | 20 6c 69 73 74 2c 0d 09 |x_handle| list,..|
|00001f40| 73 68 6f 72 74 20 6e 65 | 77 5f 74 61 62 5f 76 61 |short ne|w_tab_va|
|00001f50| 6c 75 65 29 3b 0d 70 61 | 73 63 61 6c 20 73 68 6f |lue);.pa|scal sho|
|00001f60| 72 74 20 4c 69 73 74 62 | 6f 78 47 65 74 54 61 62 |rt Listb|oxGetTab|
|00001f70| 56 61 6c 75 65 28 63 6f | 6e 73 74 20 6c 69 73 74 |Value(co|nst list|
|00001f80| 62 6f 78 5f 68 61 6e 64 | 6c 65 20 6c 69 73 74 29 |box_hand|le list)|
|00001f90| 3b 0d 50 52 4f 43 45 44 | 55 52 45 20 4c 69 73 74 |;.PROCED|URE List|
|00001fa0| 62 6f 78 53 65 74 54 61 | 62 56 61 6c 75 65 28 6c |boxSetTa|bValue(l|
|00001fb0| 69 73 74 3a 20 6c 69 73 | 74 62 6f 78 5f 68 61 6e |ist: lis|tbox_han|
|00001fc0| 64 6c 65 3b 0d 09 6e 65 | 77 5f 74 61 62 5f 76 61 |dle;..ne|w_tab_va|
|00001fd0| 6c 75 65 3a 20 49 4e 54 | 45 47 45 52 29 3b 0d 46 |lue: INT|EGER);.F|
|00001fe0| 55 4e 43 54 49 4f 4e 20 | 4c 69 73 74 62 6f 78 47 |UNCTION |ListboxG|
|00001ff0| 65 74 54 61 62 56 61 6c | 75 65 28 6c 69 73 74 3a |etTabVal|ue(list:|
|00002000| 20 6c 69 73 74 62 6f 78 | 5f 68 61 6e 64 6c 65 29 | listbox|_handle)|
|00002010| 20 3a 20 49 4e 54 45 47 | 45 52 3b 0d 0d 53 65 74 | : INTEG|ER;..Set|
|00002020| 73 2f 67 65 74 73 20 74 | 68 65 20 74 61 62 20 73 |s/gets t|he tab s|
|00002030| 70 61 63 69 6e 67 20 76 | 61 6c 75 65 20 66 6f 72 |pacing v|alue for|
|00002040| 20 61 20 6c 69 73 74 2e | 0d 0d 4c 69 73 74 62 6f | a list.|..Listbo|
|00002050| 78 53 65 74 54 61 62 56 | 61 6c 75 65 20 69 73 20 |xSetTabV|alue is |
|00002060| 61 20 72 65 71 75 69 72 | 65 64 20 66 75 6e 63 74 |a requir|ed funct|
|00002070| 69 6f 6e 20 69 66 20 79 | 6f 75 20 77 61 6e 74 20 |ion if y|ou want |
|00002080| 74 6f 20 73 65 74 20 61 | 20 73 70 65 63 69 66 69 |to set a| specifi|
|00002090| 63 20 74 61 62 20 73 70 | 61 63 69 6e 67 20 66 6f |c tab sp|acing fo|
|000020a0| 72 20 61 20 6c 69 73 74 | 3b 20 20 74 68 65 20 74 |r a list|; the t|
|000020b0| 61 62 20 73 70 61 63 69 | 6e 67 2c 20 69 6e 20 70 |ab spaci|ng, in p|
|000020c0| 69 78 65 6c 73 2c 20 69 | 73 20 77 68 61 74 20 64 |ixels, i|s what d|
|000020d0| 65 74 65 72 6d 69 6e 65 | 73 20 77 68 65 72 65 20 |etermine|s where |
|000020e0| 74 6f 20 70 6f 73 69 74 | 69 6f 6e 20 74 68 65 20 |to posit|ion the |
|000020f0| 6e 65 78 74 20 63 68 61 | 72 61 63 74 65 72 20 61 |next cha|racter a|
|00002100| 66 74 65 72 20 61 20 74 | 61 62 20 63 68 61 72 61 |fter a t|ab chara|
|00002110| 63 74 65 72 20 77 68 65 | 6e 20 64 72 61 77 69 6e |cter whe|n drawin|
|00002120| 67 20 61 20 64 61 74 61 | 20 65 6c 65 6d 65 6e 74 |g a data| element|
|00002130| 2e 20 20 54 68 65 20 74 | 61 62 20 73 70 61 63 69 |. The t|ab spaci|
|00002140| 6e 67 20 74 68 61 74 20 | 69 73 20 73 65 74 20 63 |ng that |is set c|
|00002150| 72 65 61 74 65 73 20 61 | 6e 20 22 69 6d 61 67 69 |reates a|n "imagi|
|00002160| 6e 61 72 79 22 20 73 65 | 72 69 65 73 20 6f 66 20 |nary" se|ries of |
|00002170| 74 61 62 20 73 74 6f 70 | 73 20 61 63 72 6f 73 73 |tab stop|s across|
|00002180| 20 74 68 65 20 6c 69 73 | 74 20 d1 20 77 68 65 6e | the lis|t . when|
|00002190| 20 61 20 6c 69 73 74 20 | 65 6c 65 6d 65 6e 74 20 | a list |element |
|000021a0| 69 73 20 64 72 61 77 6e | 20 61 6e 64 20 61 20 74 |is drawn| and a t|
|000021b0| 61 62 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 |ab chara|cter is |
|000021c0| 65 6e 63 6f 75 6e 74 65 | 72 65 64 2c 20 74 68 65 |encounte|red, the|
|000021d0| 20 6e 65 78 74 20 63 68 | 61 72 61 63 74 65 72 20 | next ch|aracter |
|000021e0| 64 72 61 77 73 20 61 74 | 20 74 68 65 20 6e 65 78 |draws at| the nex|
|000021f0| 74 20 22 74 61 62 20 73 | 74 6f 70 22 20 74 6f 20 |t "tab s|top" to |
|00002200| 74 68 65 20 72 69 67 68 | 74 2e 0d 0d 53 69 6d 70 |the righ|t...Simp|
|00002210| 6c 79 20 73 74 61 74 65 | 64 2c 20 74 68 65 20 74 |ly state|d, the t|
|00002220| 61 62 20 73 70 61 63 69 | 6e 67 20 76 61 6c 75 65 |ab spaci|ng value|
|00002230| 20 63 61 75 73 65 73 20 | 22 74 61 62 20 73 74 6f | causes |"tab sto|
|00002240| 70 73 22 20 61 74 20 65 | 76 65 72 79 20 74 61 62 |ps" at e|very tab|
|00002250| 2d 73 70 61 63 65 2d 76 | 61 6c 75 65 20 69 6e 63 |-space-v|alue inc|
|00002260| 72 65 6d 65 6e 74 3b 20 | 69 66 20 74 68 65 20 73 |rement; |if the s|
|00002270| 70 61 63 69 6e 67 20 76 | 61 6c 75 65 20 77 65 72 |pacing v|alue wer|
|00002280| 65 20 33 32 20 70 69 78 | 65 6c 73 2c 20 79 6f 75 |e 32 pix|els, you|
|00002290| 20 63 61 6e 20 69 6d 61 | 67 69 6e 65 20 61 20 74 | can ima|gine a t|
|000022a0| 61 62 20 73 74 6f 70 20 | 65 78 69 73 74 73 20 61 |ab stop |exists a|
|000022b0| 74 20 65 76 65 72 79 20 | 33 32 6e 64 20 70 69 78 |t every |32nd pix|
|000022c0| 65 6c 20 66 72 6f 6d 20 | 74 68 65 20 6c 65 66 74 |el from |the left|
|000022d0| 20 65 64 67 65 20 6f 66 | 20 74 68 65 20 6c 69 73 | edge of| the lis|
|000022e0| 74 62 6f 78 2e 0d 0d 00 | 01 00 0d 00 00 00 02 00 |tbox....|........|
|000022f0| 09 00 32 00 14 00 09 00 | 7e 00 1e 00 0d 00 00 00 |..2.....|~.......|
|00002300| 1f 00 0d 00 00 00 20 00 | 0d 00 00 00 21 00 0d 00 |...... .|....!...|
|00002310| 00 00 22 00 0d 00 00 00 | 23 00 0d 00 00 00 24 00 |..".....|#.....$.|
|00002320| 0d 00 00 00 25 00 0d 00 | 00 00 26 00 0d 00 00 00 |....%...|..&.....|
|00002330| 27 00 0d 00 00 00 28 00 | 0d 00 00 00 29 00 0d 00 |'.....(.|....)...|
|00002340| 00 00 2a 00 0d 00 00 00 | 2b 00 0d 00 00 00 65 00 |..*.....|+.....e.|
|00002350| 0d 00 00 00 66 00 09 00 | 72 00 7c 00 0d 00 00 00 |....f...|r.|.....|
|00002360| b8 00 0d 00 00 00 eb 00 | 0d 00 00 00 ec 00 09 00 |........|........|
|00002370| 72 01 05 00 0d 00 00 01 | 42 00 0d 00 00 01 43 00 |r.......|B.....C.|
|00002380| 0d 00 00 01 6f 00 0d 00 | 00 01 70 00 0d 00 00 03 |....o...|..p.....|
|00002390| 31 00 0d 00 00 03 32 00 | 0d 00 00 04 0c 00 0d 00 |1.....2.|........|
|000023a0| 00 04 0d 00 0d 00 00 0d | 00 00 03 36 00 0d 00 00 |........|...6....|
|000023b0| 04 10 00 0d 00 00 04 11 | 00 0d 00 00 4c 69 73 74 |........|....List|
|000023c0| 62 6f 78 47 65 74 54 61 | 62 56 61 6c 75 65 20 77 |boxGetTa|bValue w|
|000023d0| 69 6c 6c 20 72 65 74 75 | 72 6e 20 74 68 65 20 63 |ill retu|rn the c|
|000023e0| 75 72 72 65 6e 74 20 74 | 61 62 20 76 61 6c 75 65 |urrent t|ab value|
|000023f0| 20 66 6f 72 20 6c 69 73 | 74 2e 0d 0d 44 69 73 70 | for lis|t...Disp|
|00002400| 6f 73 65 0d 0d 70 61 73 | 63 61 6c 20 76 6f 69 64 |ose..pas|cal void|
|00002410| 20 4c 69 73 74 62 6f 78 | 44 69 73 70 6f 73 65 28 | Listbox|Dispose(|
|00002420| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 20 6c |listbox_|handle l|
|00002430| 69 73 74 29 3b 0d 50 52 | 4f 43 45 44 55 52 45 20 |ist);.PR|OCEDURE |
|00002440| 4c 69 73 74 62 6f 78 44 | 69 73 70 6f 73 65 28 6c |ListboxD|ispose(l|
|00002450| 69 73 74 3a 20 6c 69 73 | 74 62 6f 78 5f 68 61 6e |ist: lis|tbox_han|
|00002460| 64 6c 65 29 3b 0d 0d 44 | 69 73 70 6f 73 65 73 20 |dle);..D|isposes |
|00002470| 61 20 6c 69 73 74 62 6f | 78 20 70 72 65 76 69 6f |a listbo|x previo|
|00002480| 75 73 6c 79 20 63 72 65 | 61 74 65 64 20 77 69 74 |usly cre|ated wit|
|00002490| 68 20 4c 69 73 74 62 6f | 78 4e 65 77 2e 0d 0d 54 |h Listbo|xNew...T|
|000024a0| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 64 69 73 |his func|tion dis|
|000024b0| 70 6f 73 65 73 20 6c 69 | 73 74 62 6f 78 20 6c 69 |poses li|stbox li|
|000024c0| 73 74 2e 0d 0d 59 6f 75 | 20 73 68 6f 75 6c 64 20 |st...You| should |
|000024d0| 64 69 73 70 6f 73 65 20 | 61 20 6c 69 73 74 62 6f |dispose |a listbo|
|000024e0| 78 20 6f 6e 63 65 20 79 | 6f 75 20 61 72 65 20 63 |x once y|ou are c|
|000024f0| 6f 6d 70 6c 65 74 65 6c | 79 20 74 68 72 6f 75 67 |ompletel|y throug|
|00002500| 68 20 75 73 69 6e 67 20 | 69 74 2e 0d 0d 44 61 74 |h using |it...Dat|
|00002510| 61 20 43 6f 6e 74 72 6f | 6c 0d 0d 70 61 73 63 61 |a Contro|l..pasca|
|00002520| 6c 20 4f 53 45 72 72 20 | 4c 69 73 74 62 6f 78 52 |l OSErr |ListboxR|
|00002530| 65 70 6c 61 63 65 44 61 | 74 61 28 6c 69 73 74 62 |eplaceDa|ta(listb|
|00002540| 6f 78 5f 68 61 6e 64 6c | 65 20 6c 69 73 74 2c 0d |ox_handl|e list,.|
|00002550| 09 63 6f 6e 73 74 20 76 | 6f 69 64 20 2a 64 61 74 |.const v|oid *dat|
|00002560| 61 2c 20 73 69 7a 65 5f | 74 20 6c 65 6e 67 74 68 |a, size_|t length|
|00002570| 29 3b 0d 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |);.pasca|l OSErr |
|00002580| 4c 69 73 74 62 6f 78 41 | 70 70 65 6e 64 44 61 74 |ListboxA|ppendDat|
|00002590| 61 28 6c 69 73 74 62 6f | 78 5f 68 61 6e 64 6c 65 |a(listbo|x_handle|
|000025a0| 20 6c 69 73 74 2c 0d 09 | 63 6f 6e 73 74 20 76 6f | list,..|const vo|
|000025b0| 69 64 20 2a 64 61 74 61 | 2c 20 73 69 7a 65 5f 74 |id *data|, size_t|
|000025c0| 20 6c 65 6e 67 74 68 29 | 3b 0d 46 55 4e 43 54 49 | length)|;.FUNCTI|
|000025d0| 4f 4e 20 4c 69 73 74 62 | 6f 78 52 65 70 6c 61 63 |ON Listb|oxReplac|
|000025e0| 65 44 61 74 61 28 6c 69 | 73 74 3a 20 6c 69 73 74 |eData(li|st: list|
|000025f0| 62 6f 78 5f 68 61 6e 64 | 6c 65 3b 20 64 61 74 61 |box_hand|le; data|
|00002600| 3a 20 50 74 72 3b 0d 09 | 6c 65 6e 67 74 68 3a 20 |: Ptr;..|length: |
|00002610| 4c 4f 4e 47 49 4e 54 29 | 20 3a 20 4f 53 45 72 72 |LONGINT)| : OSErr|
|00002620| 3b 0d 46 55 4e 43 54 49 | 4f 4e 20 4c 69 73 74 62 |;.FUNCTI|ON Listb|
|00002630| 6f 78 41 70 70 65 6e 64 | 44 61 74 61 28 6c 69 73 |oxAppend|Data(lis|
|00002640| 74 3a 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |t: listb|ox_handl|
|00002650| 65 3b 20 64 61 74 61 3a | 20 50 74 72 3b 0d 09 6c |e; data:| Ptr;..l|
|00002660| 65 6e 67 74 68 3a 20 4c | 4f 4e 47 49 4e 54 29 20 |ength: L|ONGINT) |
|00002670| 3a 20 4f 53 45 72 72 3b | 0d 0d 4c 69 73 74 62 6f |: OSErr;|..Listbo|
|00002680| 78 52 65 70 6c 61 63 65 | 44 61 74 61 20 64 65 6c |xReplace|Data del|
|00002690| 65 74 65 73 20 61 6c 6c | 20 74 68 65 20 65 6c 65 |etes all| the ele|
|000026a0| 6d 65 6e 74 73 20 69 6e | 20 61 20 6c 69 73 74 20 |ments in| a list |
|000026b0| 61 6e 64 20 69 6e 73 65 | 72 74 73 20 6e 65 77 20 |and inse|rts new |
|000026c0| 65 6c 65 6d 65 6e 74 73 | 3b 20 20 4c 69 73 74 42 |elements|; ListB|
|000026d0| 6f 78 41 70 70 65 6e 64 | 44 61 74 61 20 69 6e 73 |oxAppend|Data ins|
|000026e0| 65 72 74 73 20 6e 65 77 | 20 65 6c 65 6d 65 6e 74 |erts new| element|
|000026f0| 73 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |s to the| end of |
|00002700| 74 68 65 20 6c 69 73 74 | 2e 0d 0d 54 68 69 73 20 |the list|...This |
|00002710| 69 73 20 68 6f 77 20 79 | 6f 75 20 61 64 64 20 64 |is how y|ou add d|
|00002720| 61 74 61 20 65 6c 65 6d | 65 6e 74 73 20 69 6e 74 |ata elem|ents int|
|00002730| 6f 20 61 20 6c 69 73 74 | 62 6f 78 2e 20 20 54 68 |o a list|box. Th|
|00002740| 65 20 64 61 74 61 20 69 | 73 20 69 6e 73 65 72 74 |e data i|s insert|
|00002750| 65 64 20 69 6e 74 6f 20 | 6c 69 73 74 20 28 77 68 |ed into |list (wh|
|00002760| 69 63 68 20 69 73 20 61 | 20 6c 69 73 74 62 6f 78 |ich is a| listbox|
|00002770| 5f 68 61 6e 64 6c 65 20 | 6f 62 74 61 69 6e 65 64 |_handle |obtained|
|00002780| 20 65 61 72 6c 69 65 72 | 20 66 72 6f 6d 20 4c 69 | earlier| from Li|
|00002790| 73 74 62 6f 78 4e 65 77 | 29 3b 20 20 62 6f 74 68 |stboxNew|); both|
|000027a0| 20 6f 66 20 74 68 65 73 | 65 20 66 75 6e 63 74 69 | of thes|e functi|
|000027b0| 6f 6e 73 20 77 69 6c 6c | 20 64 6f 20 61 6e 20 49 |ons will| do an I|
|000027c0| 6e 76 61 6c 52 65 63 74 | 20 6f 6e 20 74 68 65 20 |nvalRect| on the |
|000027d0| 61 72 65 61 20 6f 66 20 | 74 68 65 20 6c 69 73 74 |area of |the list|
|000027e0| 20 61 6e 64 20 61 64 6a | 75 73 74 20 74 68 65 20 | and adj|ust the |
|000027f0| 73 63 72 6f 6c 6c 62 61 | 72 20 61 63 63 6f 72 64 |scrollba|r accord|
|00002800| 69 6e 67 20 74 6f 20 74 | 68 65 20 6e 65 77 20 6c |ing to t|he new l|
|00002810| 69 73 74 20 71 75 61 6e | 74 69 74 79 2e 0d 00 3f |ist quan|tity...?|
|00002820| 00 0d 00 00 00 40 00 0d | 00 00 00 48 00 0d 00 00 |.....@..|...H....|
|00002830| 00 49 00 0d 00 00 00 7a | 00 0d 00 00 00 aa 00 0d |.I.....z|........|
|00002840| 00 00 00 ab 00 0d 00 00 | 00 e2 00 0d 00 00 00 e3 |........|........|
|00002850| 00 0d 00 00 01 08 00 0d | 00 00 01 09 00 0d 00 00 |........|........|
|00002860| 01 50 00 0d 00 00 01 51 | 00 0d 00 00 01 5e 00 0d |.P.....Q|.....^..|
|00002870| 00 00 01 5f 00 0d 00 00 | 01 94 00 0d 00 00 01 95 |..._....|........|
|00002880| 00 09 00 72 01 b7 00 0d | 00 00 01 eb 00 0d 00 00 |...r....|........|
|00002890| 01 ec 00 09 00 72 02 0e | 00 0d 00 00 02 4b 00 0d |.....r..|.....K..|
|000028a0| 00 00 02 4c 00 09 00 72 | 02 66 00 0d 00 00 02 a2 |...L...r|.f......|
|000028b0| 00 0d 00 00 02 a3 00 09 | 00 72 02 bd 00 0d 00 00 |........|.r......|
|000028c0| 02 be 00 0d 00 00 03 4e | 00 0d 00 00 03 4f 00 0d |.......N|.....O..|
|000028d0| 00 00 04 62 00 0d 00 00 | 0d 54 68 65 20 6f 6e 6c |...b....|.The onl|
|000028e0| 79 20 64 69 66 66 65 72 | 65 6e 63 65 20 62 65 74 |y differ|ence bet|
|000028f0| 77 65 65 6e 20 4c 69 73 | 74 62 6f 78 52 65 70 6c |ween Lis|tboxRepl|
|00002900| 61 63 65 44 61 74 61 20 | 61 6e 64 20 4c 69 73 74 |aceData |and List|
|00002910| 62 6f 78 41 70 70 65 6e | 64 44 61 74 61 20 69 73 |boxAppen|dData is|
|00002920| 20 74 68 65 20 6c 61 74 | 74 65 72 20 72 65 70 6c | the lat|ter repl|
|00002930| 61 63 65 73 20 74 68 65 | 20 65 78 69 73 74 69 6e |aces the| existin|
|00002940| 67 20 65 6c 65 6d 65 6e | 74 73 20 77 68 65 72 65 |g elemen|ts where|
|00002950| 61 73 20 4c 69 73 74 62 | 6f 78 41 70 70 65 6e 64 |as Listb|oxAppend|
|00002960| 44 61 74 61 20 77 69 6c | 6c 20 61 70 70 65 6e 64 |Data wil|l append|
|00002970| 20 74 68 65 20 6e 65 77 | 20 64 61 74 61 20 74 6f | the new| data to|
|00002980| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00002990| 6c 69 73 74 2e 0d 0d 54 | 68 65 20 6c 65 6e 67 74 |list...T|he lengt|
|000029a0| 68 20 70 61 72 61 6d 65 | 74 65 72 20 69 6e 20 4c |h parame|ter in L|
|000029b0| 69 73 74 62 6f 78 52 65 | 70 6c 61 63 65 44 61 74 |istboxRe|placeDat|
|000029c0| 61 20 61 6e 64 20 4c 69 | 73 74 62 6f 78 41 70 70 |a and Li|stboxApp|
|000029d0| 65 6e 64 44 61 74 61 20 | 6d 75 73 74 20 63 6f 6e |endData |must con|
|000029e0| 74 61 69 6e 20 74 68 65 | 20 74 6f 74 61 6c 20 6c |tain the| total l|
|000029f0| 65 6e 67 74 68 20 6f 66 | 20 61 6c 6c 20 65 6c 65 |ength of| all ele|
|00002a00| 6d 65 6e 74 73 20 63 6f | 6d 62 69 6e 65 64 2e 20 |ments co|mbined. |
|00002a10| 20 49 6e 20 74 68 65 20 | 61 62 6f 76 65 20 65 78 | In the |above ex|
|00002a20| 61 6d 70 6c 65 2c 20 74 | 68 65 20 6c 65 6e 67 74 |ample, t|he lengt|
|00002a30| 68 20 69 73 20 66 6f 75 | 72 2e 0d 0d 54 68 65 73 |h is fou|r...Thes|
|00002a40| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 77 69 6c 6c |e functi|ons will|
|00002a50| 20 72 65 74 75 72 6e 20 | 6e 6f 45 72 72 20 28 30 | return |noErr (0|
|00002a60| 29 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2c |) if suc|cessful,|
|00002a70| 20 6f 72 20 61 20 4d 65 | 6d 6f 72 79 20 4d 61 6e | or a Me|mory Man|
|00002a80| 61 67 65 72 20 65 72 72 | 6f 72 20 69 66 20 75 6e |ager err|or if un|
|00002a90| 73 75 63 63 65 73 73 66 | 75 6c 2e 0d 0d 49 66 20 |successf|ul...If |
|00002aa0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 69 6e 73 65 |you want| to inse|
|00002ab0| 72 74 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 66 |rt a dif|ferent f|
|00002ac0| 6f 72 6d 61 74 20 6f 66 | 20 64 61 74 61 20 69 6e |ormat of| data in|
|00002ad0| 73 74 65 61 64 20 6f 66 | 20 50 61 73 63 61 6c 20 |stead of| Pascal |
|00002ae0| 73 74 72 69 6e 67 73 2c | 20 79 6f 75 20 6d 61 79 |strings,| you may|
|00002af0| 20 64 6f 20 73 6f 20 62 | 79 20 75 73 69 6e 67 20 | do so b|y using |
|00002b00| 74 68 65 20 6c 69 73 74 | 62 6f 78 20 68 6f 6f 6b |the list|box hook|
|00002b10| 73 2e 20 0d 0d 00 01 00 | 0d 00 00 00 be 00 0d 00 |s. .....|........|
|00002b20| 00 00 bf 00 0d 00 00 01 | 63 00 0d 00 00 01 64 00 |........|c.....d.|
|00002b30| 0d 00 00 01 c4 00 0d 00 | 00 01 c5 00 0d 00 00 02 |........|........|
|00002b40| 3c 00 0d 00 00 02 3d 00 | 0d 00 00 0d 70 61 73 63 |<.....=.|....pasc|
|00002b50| 61 6c 20 4f 53 45 72 72 | 20 4c 69 73 74 62 6f 78 |al OSErr| Listbox|
|00002b60| 49 6e 73 65 72 74 45 6c | 65 6d 65 6e 74 28 6c 69 |InsertEl|ement(li|
|00002b70| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 20 6c 69 73 |stbox_ha|ndle lis|
|00002b80| 74 2c 0d 09 76 6f 69 64 | 20 2a 64 61 74 61 2c 20 |t,..void| *data, |
|00002b90| 73 69 7a 65 5f 74 20 6c | 65 6e 67 74 68 2c 20 6c |size_t l|ength, l|
|00002ba0| 6f 6e 67 20 62 65 66 6f | 72 65 5f 65 6c 65 6d 65 |ong befo|re_eleme|
|00002bb0| 6e 74 29 3b 0d 46 55 4e | 43 54 49 4f 4e 20 4c 69 |nt);.FUN|CTION Li|
|00002bc0| 73 74 62 6f 78 49 6e 73 | 65 72 74 45 6c 65 6d 65 |stboxIns|ertEleme|
|00002bd0| 6e 74 28 6c 69 73 74 3a | 20 6c 69 73 74 62 6f 78 |nt(list:| listbox|
|00002be0| 5f 68 61 6e 64 6c 65 3b | 20 64 61 74 61 3a 20 50 |_handle;| data: P|
|00002bf0| 74 72 3b 0d 09 6c 65 6e | 67 74 68 3a 20 4c 4f 4e |tr;..len|gth: LON|
|00002c00| 47 49 4e 54 3b 20 62 65 | 66 6f 72 65 5f 65 6c 65 |GINT; be|fore_ele|
|00002c10| 6d 65 6e 74 3a 20 4c 4f | 4e 47 49 4e 54 29 20 3a |ment: LO|NGINT) :|
|00002c20| 20 4f 53 45 72 72 3b 0d | 0d 49 6e 73 65 72 74 73 | OSErr;.|.Inserts|
|00002c30| 20 6f 6e 65 20 65 6c 65 | 6d 65 6e 74 20 61 6e 79 | one ele|ment any|
|00002c40| 77 68 65 72 65 20 69 6e | 20 61 20 6c 69 73 74 2e |where in| a list.|
|00002c50| 0d 0d 55 73 65 20 74 68 | 69 73 20 66 75 6e 63 74 |..Use th|is funct|
|00002c60| 69 6f 6e 20 74 6f 20 69 | 6e 73 65 72 74 20 61 20 |ion to i|nsert a |
|00002c70| 73 69 6e 67 6c 65 20 65 | 6c 65 6d 65 6e 74 20 6f |single e|lement o|
|00002c80| 74 68 65 72 20 74 68 61 | 6e 20 61 70 70 65 6e 64 |ther tha|n append|
|00002c90| 69 6e 67 20 69 74 20 74 | 6f 20 74 68 65 20 65 6e |ing it t|o the en|
|00002ca0| 64 2e 20 20 41 66 74 65 | 72 20 74 68 65 20 65 6c |d. Afte|r the el|
|00002cb0| 65 6d 65 6e 74 20 69 73 | 20 69 6e 73 65 72 74 65 |ement is| inserte|
|00002cc0| 64 2c 20 61 6e 20 49 6e | 76 61 6c 52 65 63 74 20 |d, an In|valRect |
|00002cd0| 6f 63 63 75 72 73 20 6f | 6e 20 74 68 65 20 6c 69 |occurs o|n the li|
|00002ce0| 73 74 62 6f 78 20 61 72 | 65 61 20 61 6e 64 20 74 |stbox ar|ea and t|
|00002cf0| 68 65 20 73 63 72 6f 6c | 6c 62 61 72 20 69 73 20 |he scrol|lbar is |
|00002d00| 61 64 6a 75 73 74 65 64 | 20 66 6f 72 20 74 68 65 |adjusted| for the|
|00002d10| 20 6e 65 77 20 65 6c 65 | 6d 65 6e 74 20 71 75 61 | new ele|ment qua|
|00002d20| 6e 74 69 74 79 2e 0d 0d | 54 68 65 20 64 61 74 61 |ntity...|The data|
|00002d30| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 61 20 | paramet|er is a |
|00002d40| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 6e |pointer |to the n|
|00002d50| 65 77 20 65 6c 65 6d 65 | 6e 74 27 73 20 64 61 74 |ew eleme|nt's dat|
|00002d60| 61 3b 20 20 74 68 65 20 | 64 61 74 61 20 6d 75 73 |a; the |data mus|
|00002d70| 74 20 62 65 20 61 20 50 | 61 73 63 61 6c 20 73 74 |t be a P|ascal st|
|00002d80| 72 69 6e 67 2e 0d 0d 54 | 68 65 20 6c 65 6e 67 74 |ring...T|he lengt|
|00002d90| 68 20 70 61 72 61 6d 65 | 74 65 72 20 69 73 20 74 |h parame|ter is t|
|00002da0| 68 65 20 74 6f 74 61 6c | 20 6c 65 6e 67 74 68 20 |he total| length |
|00002db0| 6f 66 20 74 68 65 20 64 | 61 74 61 2c 20 77 68 69 |of the d|ata, whi|
|00002dc0| 63 68 20 69 6e 63 6c 75 | 64 65 73 20 74 68 65 20 |ch inclu|des the |
|00002dd0| 6c 65 6e 67 74 68 20 62 | 79 74 65 20 6f 66 20 74 |length b|yte of t|
|00002de0| 68 65 20 50 61 73 63 61 | 6c 20 73 74 72 69 6e 67 |he Pasca|l string|
|00002df0| 2e 20 20 0d 00 01 00 0d | 00 00 00 38 00 0d 00 00 |. .....|...8....|
|00002e00| 00 39 00 09 00 72 00 6a | 00 0d 00 00 00 a9 00 0d |.9...r.j|........|
|00002e10| 00 00 00 aa 00 09 00 72 | 00 dd 00 0d 00 00 00 de |.......r|........|
|00002e20| 00 0d 00 00 01 06 00 0d | 00 00 01 07 00 0d 00 00 |........|........|
|00002e30| 01 dc 00 0d 00 00 01 dd | 00 0d 00 00 02 3b 00 0d |........|.....;..|
|00002e40| 00 00 02 3c 00 0d 00 00 | 02 a9 00 0d 00 00 0d 54 |...<....|.......T|
|00002e50| 68 65 20 65 6c 65 6d 65 | 6e 74 20 77 69 6c 6c 20 |he eleme|nt will |
|00002e60| 62 65 20 69 6e 73 65 72 | 74 65 64 20 69 6d 6d 65 |be inser|ted imme|
|00002e70| 64 69 61 74 65 6c 79 20 | 61 62 6f 76 65 20 62 65 |diately |above be|
|00002e80| 66 6f 72 65 5f 65 6c 65 | 6d 65 6e 74 20 69 6e 20 |fore_ele|ment in |
|00002e90| 74 68 65 20 6c 69 73 74 | 3b 20 74 68 65 20 66 69 |the list|; the fi|
|00002ea0| 72 73 74 20 28 74 6f 70 | 29 20 65 6c 65 6d 65 6e |rst (top|) elemen|
|00002eb0| 74 20 6f 66 20 74 68 65 | 20 6c 69 73 74 20 69 73 |t of the| list is|
|00002ec0| 20 7a 65 72 6f 2e 0d 0d | 4c 69 73 74 62 6f 78 49 | zero...|ListboxI|
|00002ed0| 6e 73 65 72 74 45 6c 65 | 6d 65 6e 74 20 77 69 6c |nsertEle|ment wil|
|00002ee0| 6c 20 72 65 74 75 72 6e | 20 6e 6f 45 72 72 20 28 |l return| noErr (|
|00002ef0| 30 29 20 69 66 20 73 75 | 63 63 65 73 73 66 75 6c |0) if su|ccessful|
|00002f00| 2c 20 6f 72 20 61 20 4d | 65 6d 6f 72 79 20 4d 61 |, or a M|emory Ma|
|00002f10| 6e 61 67 65 72 20 65 72 | 72 6f 72 20 69 66 20 75 |nager er|ror if u|
|00002f20| 6e 73 75 63 63 65 73 73 | 66 75 6c 2e 0d 0d 0d 70 |nsuccess|ful....p|
|00002f30| 61 73 63 61 6c 20 48 61 | 6e 64 6c 65 20 4c 69 73 |ascal Ha|ndle Lis|
|00002f40| 74 62 6f 78 47 65 74 45 | 6c 65 6d 65 6e 74 44 61 |tboxGetE|lementDa|
|00002f50| 74 61 28 63 6f 6e 73 74 | 20 6c 69 73 74 62 6f 78 |ta(const| listbox|
|00002f60| 5f 68 61 6e 64 6c 65 20 | 6c 69 73 74 2c 0d 09 6c |_handle |list,..l|
|00002f70| 6f 6e 67 20 65 6c 65 6d | 65 6e 74 29 3b 0d 46 55 |ong elem|ent);.FU|
|00002f80| 4e 43 54 49 4f 4e 20 4c | 69 73 74 62 6f 78 47 65 |NCTION L|istboxGe|
|00002f90| 74 45 6c 65 6d 65 6e 74 | 44 61 74 61 28 6c 69 73 |tElement|Data(lis|
|00002fa0| 74 3a 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |t: listb|ox_handl|
|00002fb0| 65 3b 0d 09 65 6c 65 6d | 65 6e 74 3a 20 4c 4f 4e |e;..elem|ent: LON|
|00002fc0| 47 49 4e 54 29 20 3a 20 | 48 61 6e 64 6c 65 3b 0d |GINT) : |Handle;.|
|00002fd0| 0d 52 65 74 75 72 6e 73 | 20 61 20 6e 65 77 20 48 |.Returns| a new H|
|00002fe0| 61 6e 64 6c 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |andle co|ntaining|
|00002ff0| 20 74 68 65 20 64 61 74 | 61 20 66 72 6f 6d 20 61 | the dat|a from a|
|00003000| 20 73 70 65 63 69 66 69 | 63 20 65 6c 65 6d 65 6e | specifi|c elemen|
|00003010| 74 20 6f 66 20 61 20 6c | 69 73 74 2e 0d 0d 49 66 |t of a l|ist...If|
|00003020| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 20 67 65 74 | you wan|t to get|
|00003030| 20 74 68 65 20 64 61 74 | 61 20 6f 66 20 61 20 73 | the dat|a of a s|
|00003040| 69 6e 67 6c 65 20 65 6c | 65 6d 65 6e 74 2c 20 75 |ingle el|ement, u|
|00003050| 73 65 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |se this |function|
|00003060| 20 62 79 20 70 61 73 73 | 69 6e 67 20 61 20 6c 69 | by pass|ing a li|
|00003070| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 20 69 6e 20 |stbox_ha|ndle in |
|00003080| 6c 69 73 74 20 61 6e 64 | 20 74 68 65 20 77 61 6e |list and| the wan|
|00003090| 74 65 64 20 65 6c 65 6d | 65 6e 74 20 69 6e 20 65 |ted elem|ent in e|
|000030a0| 6c 65 6d 65 6e 74 3b 20 | 20 74 68 65 20 66 69 72 |lement; | the fir|
|000030b0| 73 74 20 65 6c 65 6d 65 | 6e 74 20 69 6e 20 74 68 |st eleme|nt in th|
|000030c0| 65 20 6c 69 73 74 20 69 | 73 20 7a 65 72 6f 2e 0d |e list i|s zero..|
|000030d0| 00 01 00 0d 00 00 00 79 | 00 0d 00 00 00 7a 00 0d |.......y|.....z..|
|000030e0| 00 00 00 df 00 0d 00 00 | 00 e0 00 0d 00 00 00 e1 |........|........|
|000030f0| 00 0d 00 00 01 20 00 0d | 00 00 01 21 00 09 00 72 |..... ..|...!...r|
|00003100| 01 30 00 0d 00 00 01 65 | 00 0d 00 00 01 66 00 09 |.0.....e|.....f..|
|00003110| 00 72 01 82 00 0d 00 00 | 01 83 00 0d 00 00 01 cf |.r......|........|
|00003120| 00 0d 00 00 01 d0 00 0d | 00 00 02 82 00 0d 00 00 |........|........|
|00003130| 0d 48 6f 77 65 76 65 72 | 2c 20 79 6f 75 20 6d 75 |.However|, you mu|
|00003140| 73 74 20 62 65 20 63 65 | 72 74 61 69 6e 20 74 68 |st be ce|rtain th|
|00003150| 61 74 20 65 6c 65 6d 65 | 6e 74 20 61 63 74 75 61 |at eleme|nt actua|
|00003160| 6c 6c 79 20 65 78 69 73 | 74 73 20 69 6e 20 6c 69 |lly exis|ts in li|
|00003170| 73 74 20 6f 72 20 61 6e | 20 65 72 72 6f 72 20 6d |st or an| error m|
|00003180| 61 79 20 72 65 73 75 6c | 74 2e 0d 0d 0d 0d 70 61 |ay resul|t.....pa|
|00003190| 73 63 61 6c 20 48 61 6e | 64 6c 65 20 4c 69 73 74 |scal Han|dle List|
|000031a0| 62 6f 78 47 65 74 41 6c | 6c 44 61 74 61 28 63 6f |boxGetAl|lData(co|
|000031b0| 6e 73 74 20 6c 69 73 74 | 62 6f 78 5f 68 61 6e 64 |nst list|box_hand|
|000031c0| 6c 65 20 6c 69 73 74 2c | 0d 09 73 68 6f 72 74 20 |le list,|..short |
|000031d0| 73 65 6c 65 63 74 65 64 | 5f 6f 6e 6c 79 29 3b 0d |selected|_only);.|
|000031e0| 46 55 4e 43 54 49 4f 4e | 20 4c 69 73 74 62 6f 78 |FUNCTION| Listbox|
|000031f0| 47 65 74 41 6c 6c 44 61 | 74 61 28 6c 69 73 74 3a |GetAllDa|ta(list:|
|00003200| 20 6c 69 73 74 62 6f 78 | 5f 68 61 6e 64 6c 65 3b | listbox|_handle;|
|00003210| 0d 09 73 65 6c 65 63 74 | 65 64 5f 6f 6e 6c 79 3a |..select|ed_only:|
|00003220| 20 49 4e 54 45 47 45 52 | 29 20 3a 20 48 61 6e 64 | INTEGER|) : Hand|
|00003230| 6c 65 3b 0d 0d 52 65 74 | 75 72 6e 73 20 61 20 48 |le;..Ret|urns a H|
|00003240| 61 6e 64 6c 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |andle co|ntaining|
|00003250| 20 61 6c 6c 20 74 68 65 | 20 65 6c 65 6d 65 6e 74 | all the| element|
|00003260| 73 20 6f 66 20 61 20 6c | 69 73 74 20 28 6f 72 20 |s of a l|ist (or |
|00003270| 61 6c 6c 20 74 68 65 20 | 73 65 6c 65 63 74 65 64 |all the |selected|
|00003280| 20 65 6c 65 6d 65 6e 74 | 73 29 2e 0d 0d 54 68 69 | element|s)...Thi|
|00003290| 73 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 73 69 |s functi|on is si|
|000032a0| 6d 69 6c 61 72 20 74 6f | 20 4c 69 73 74 62 6f 78 |milar to| Listbox|
|000032b0| 47 65 74 45 6c 65 6d 65 | 6e 74 44 61 74 61 20 65 |GetEleme|ntData e|
|000032c0| 78 63 65 70 74 20 6d 6f | 72 65 20 74 68 61 6e 20 |xcept mo|re than |
|000032d0| 6f 6e 65 20 65 6c 65 6d | 65 6e 74 20 69 73 20 72 |one elem|ent is r|
|000032e0| 65 74 75 72 6e 65 64 2e | 0d 0d 49 66 20 73 65 6c |eturned.|..If sel|
|000032f0| 65 63 74 65 64 5f 6f 6e | 6c 79 20 69 73 20 6e 6f |ected_on|ly is no|
|00003300| 6e 2d 7a 65 72 6f 2c 20 | 6f 6e 6c 79 20 74 68 65 |n-zero, |only the|
|00003310| 20 65 6c 65 6d 65 6e 74 | 73 20 69 6e 20 6c 69 73 | element|s in lis|
|00003320| 74 20 74 68 61 74 20 61 | 72 65 20 63 75 72 72 65 |t that a|re curre|
|00003330| 6e 74 6c 79 20 73 65 6c | 65 63 74 65 64 20 77 69 |ntly sel|ected wi|
|00003340| 6c 6c 20 62 65 20 72 65 | 74 75 72 6e 65 64 3b 20 |ll be re|turned; |
|00003350| 69 66 20 73 65 6c 65 63 | 74 65 64 5f 6f 6e 6c 79 |if selec|ted_only|
|00003360| 20 69 73 20 7a 65 72 6f | 2c 20 61 6c 6c 20 65 6c | is zero|, all el|
|00003370| 65 6d 65 6e 74 73 20 69 | 6e 20 6c 69 73 74 20 61 |ements i|n list a|
|00003380| 72 65 20 72 65 74 75 72 | 6e 65 64 2e 0d 00 01 00 |re retur|ned.....|
|00003390| 0d 00 00 00 5b 00 0d 00 | 00 00 5c 00 0d 00 00 00 |....[...|..\.....|
|000033a0| 5d 00 0d 00 00 00 5e 00 | 0d 00 00 00 99 00 0d 00 |].....^.|........|
|000033b0| 00 00 9a 00 09 00 72 00 | b0 00 0d 00 00 00 e1 00 |......r.|........|
|000033c0| 0d 00 00 00 e2 00 09 00 | 72 01 04 00 0d 00 00 01 |........|r.......|
|000033d0| 05 00 0d 00 00 01 5c 00 | 0d 00 00 01 5d 00 0d 00 |......\.|....]...|
|000033e0| 00 01 b9 00 0d 00 00 01 | ba 00 0d 00 00 02 5d 00 |........|......].|
|000033f0| 0d 00 00 0d 54 68 65 20 | 48 61 6e 64 6c 65 20 72 |....The |Handle r|
|00003400| 65 74 75 72 6e 65 64 20 | 62 79 20 74 68 69 73 20 |eturned |by this |
|00003410| 66 75 6e 63 74 69 6f 6e | 20 77 69 6c 6c 20 63 6f |function| will co|
|00003420| 6e 74 61 69 6e 20 6f 6e | 65 20 6f 72 20 6d 6f 72 |ntain on|e or mor|
|00003430| 65 20 50 61 73 63 61 6c | 20 73 74 72 69 6e 67 73 |e Pascal| strings|
|00003440| 2c 20 62 61 63 6b 2d 74 | 6f 2d 62 61 63 6b 20 28 |, back-t|o-back (|
|00003450| 69 66 20 66 6f 72 20 61 | 6e 79 20 72 65 61 73 6f |if for a|ny reaso|
|00003460| 6e 20 4c 69 73 74 62 6f | 78 47 65 74 41 6c 6c 44 |n Listbo|xGetAllD|
|00003470| 61 74 61 20 64 6f 65 73 | 20 6e 6f 74 20 73 75 63 |ata does| not suc|
|00003480| 63 65 65 64 2c 20 68 6f | 77 65 76 65 72 2c 20 4e |ceed, ho|wever, N|
|00003490| 49 4c 20 77 69 6c 6c 20 | 62 65 20 72 65 74 75 72 |IL will |be retur|
|000034a0| 6e 65 64 29 2e 0d 0d 0d | 45 76 65 6e 74 73 0d 0d |ned)....|Events..|
|000034b0| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 4c 69 73 74 |pascal v|oid List|
|000034c0| 62 6f 78 44 72 61 77 28 | 63 6f 6e 73 74 20 6c 69 |boxDraw(|const li|
|000034d0| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 20 6c 69 73 |stbox_ha|ndle lis|
|000034e0| 74 29 3b 0d 50 52 4f 43 | 45 44 55 52 45 20 4c 69 |t);.PROC|EDURE Li|
|000034f0| 73 74 62 6f 78 44 72 61 | 77 28 6c 69 73 74 3a 20 |stboxDra|w(list: |
|00003500| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 29 3b |listbox_|handle);|
|00003510| 0d 0d 44 72 61 77 73 20 | 61 20 6c 69 73 74 62 6f |..Draws |a listbo|
|00003520| 78 20 74 6f 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |x to the| window |
|00003530| 69 6e 20 77 68 69 63 68 | 20 69 74 20 77 61 73 20 |in which| it was |
|00003540| 63 72 65 61 74 65 64 2e | 0d 0d 54 68 69 73 20 69 |created.|..This i|
|00003550| 73 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 79 |s the fu|nction y|
|00003560| 6f 75 20 73 68 6f 75 6c | 64 20 75 73 65 20 69 6e |ou shoul|d use in|
|00003570| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 61 6e 20 | respons|e to an |
|00003580| 75 70 64 61 74 65 20 65 | 76 65 6e 74 20 62 65 6c |update e|vent bel|
|00003590| 6f 6e 67 69 6e 67 20 74 | 6f 20 61 20 77 69 6e 64 |onging t|o a wind|
|000035a0| 6f 77 20 69 6e 20 77 68 | 69 63 68 20 6c 69 73 74 |ow in wh|ich list|
|000035b0| 20 77 61 73 20 63 72 65 | 61 74 65 64 2e 20 45 76 | was cre|ated. Ev|
|000035c0| 65 72 79 74 68 69 6e 67 | 20 69 6e 20 6c 69 73 74 |erything| in list|
|000035d0| 20 67 65 74 73 20 64 72 | 61 77 6e 2c 20 69 6e 63 | gets dr|awn, inc|
|000035e0| 6c 75 64 69 6e 67 20 74 | 68 65 20 66 72 61 6d 65 |luding t|he frame|
|000035f0| 20 61 72 6f 75 6e 64 20 | 74 68 65 20 6c 69 73 74 | around |the list|
|00003600| 20 61 6e 64 20 74 68 65 | 20 68 69 67 68 6c 69 67 | and the| highlig|
|00003610| 68 74 69 6e 67 20 6f 66 | 20 73 65 6c 65 63 74 65 |hting of| selecte|
|00003620| 64 20 65 6c 65 6d 65 6e | 74 73 2e 0d 00 01 00 0d |d elemen|ts......|
|00003630| 00 00 00 b3 00 0d 00 00 | 00 b4 00 0d 00 00 00 b5 |........|........|
|00003640| 00 0d 00 00 00 bc 00 0d | 00 00 00 bd 00 0d 00 00 |........|........|
|00003650| 00 f1 00 0d 00 00 01 1e | 00 0d 00 00 01 1f 00 0d |........|........|
|00003660| 00 00 01 56 00 0d 00 00 | 01 57 00 0d 00 00 02 39 |...V....|.W.....9|
|00003670| 00 0d 00 00 0d 0d 70 61 | 73 63 61 6c 20 6c 69 73 |......pa|scal lis|
|00003680| 74 62 6f 78 5f 6c 6f 63 | 61 74 69 6f 6e 5f 74 20 |tbox_loc|ation_t |
|00003690| 4c 69 73 74 62 6f 78 43 | 6c 69 63 6b 28 63 6f 6e |ListboxC|lick(con|
|000036a0| 73 74 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |st listb|ox_handl|
|000036b0| 65 20 6c 69 73 74 2c 0d | 09 63 6f 6e 73 74 20 45 |e list,.|.const E|
|000036c0| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 65 76 65 6e |ventReco|rd *even|
|000036d0| 74 2c 20 6c 6f 6e 67 20 | 2a 64 6f 75 62 6c 65 5f |t, long |*double_|
|000036e0| 63 6c 69 63 6b 29 3b 0d | 46 55 4e 43 54 49 4f 4e |click);.|FUNCTION|
|000036f0| 20 4c 69 73 74 62 6f 78 | 43 6c 69 63 6b 28 6c 69 | Listbox|Click(li|
|00003700| 73 74 3a 20 6c 69 73 74 | 62 6f 78 5f 68 61 6e 64 |st: list|box_hand|
|00003710| 6c 65 3b 20 65 76 65 6e | 74 3a 20 45 76 65 6e 74 |le; even|t: Event|
|00003720| 52 65 63 6f 72 64 3b 0d | 09 56 41 52 20 64 6f 75 |Record;.|.VAR dou|
|00003730| 62 6c 65 5f 63 6c 69 63 | 6b 3a 20 4c 4f 4e 47 49 |ble_clic|k: LONGI|
|00003740| 4e 54 29 20 3a 20 49 4e | 54 45 47 45 52 3b 0d 0d |NT) : IN|TEGER;..|
|00003750| 48 61 6e 64 6c 65 73 20 | 61 20 6d 6f 75 73 65 20 |Handles |a mouse |
|00003760| 63 6c 69 63 6b 20 77 69 | 74 68 69 6e 20 61 20 6c |click wi|thin a l|
|00003770| 69 73 74 62 6f 78 2e 0d | 0d 4c 69 73 74 62 6f 78 |istbox..|.Listbox|
|00003780| 43 6c 69 63 6b 20 73 68 | 6f 75 6c 64 20 62 65 20 |Click sh|ould be |
|00003790| 63 61 6c 6c 65 64 20 69 | 6e 20 72 65 73 70 6f 6e |called i|n respon|
|000037a0| 73 65 20 74 6f 20 61 20 | 6d 6f 75 73 65 44 6f 77 |se to a |mouseDow|
|000037b0| 6e 20 65 76 65 6e 74 20 | 77 68 69 63 68 20 6f 63 |n event |which oc|
|000037c0| 63 75 72 72 65 64 20 69 | 6e 20 61 20 77 69 6e 64 |curred i|n a wind|
|000037d0| 6f 77 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 61 20 |ow conta|ining a |
|000037e0| 6c 69 73 74 62 6f 78 2e | 0d 0d 54 68 65 20 65 76 |listbox.|..The ev|
|000037f0| 65 6e 74 20 70 61 72 61 | 6d 65 74 65 72 20 6d 75 |ent para|meter mu|
|00003800| 73 74 20 62 65 20 75 6e | 63 68 61 6e 67 65 64 20 |st be un|changed |
|00003810| 66 72 6f 6d 20 74 68 65 | 20 72 65 63 6f 72 64 20 |from the| record |
|00003820| 72 65 74 75 72 6e 65 64 | 20 69 6e 20 47 65 74 4e |returned| in GetN|
|00003830| 65 78 74 45 76 65 6e 74 | 20 6f 72 20 57 61 69 74 |extEvent| or Wait|
|00003840| 4e 65 78 74 45 76 65 6e | 74 2c 20 77 68 69 63 68 |NextEven|t, which|
|00003850| 20 6d 65 61 6e 73 20 65 | 76 65 6e 74 2e 77 68 65 | means e|vent.whe|
|00003860| 72 65 20 6d 75 73 74 20 | 62 65 20 69 6e 20 67 6c |re must |be in gl|
|00003870| 6f 62 61 6c 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |obal coo|rdinates|
|00003880| 2e 0d 00 01 00 0d 00 00 | 00 02 00 0d 00 00 00 44 |........|.......D|
|00003890| 00 0d 00 00 00 45 00 09 | 00 72 00 74 00 0d 00 00 |.....E..|.r.t....|
|000038a0| 00 b4 00 0d 00 00 00 b5 | 00 09 00 72 00 db 00 0d |........|...r....|
|000038b0| 00 00 00 dc 00 0d 00 00 | 01 04 00 0d 00 00 01 05 |........|........|
|000038c0| 00 0d 00 00 01 75 00 0d | 00 00 01 76 00 0d 00 00 |.....u..|...v....|
|000038d0| 02 0e 00 0d 00 00 0d 4c | 69 73 74 62 6f 78 43 6c |.......L|istboxCl|
|000038e0| 69 63 6b 20 74 72 61 63 | 6b 73 20 74 68 65 20 6d |ick trac|ks the m|
|000038f0| 6f 75 73 65 2c 20 68 61 | 6e 64 6c 69 6e 67 20 74 |ouse, ha|ndling t|
|00003900| 68 65 20 6c 69 73 74 20 | 61 73 20 6e 65 63 65 73 |he list |as neces|
|00003910| 73 61 72 79 20 28 69 6e | 63 6c 75 64 69 6e 67 20 |sary (in|cluding |
|00003920| 73 63 72 6f 6c 6c 62 61 | 72 20 74 72 61 63 6b 69 |scrollba|r tracki|
|00003930| 6e 67 2c 20 22 61 75 74 | 6f 22 20 64 72 61 67 2f |ng, "aut|o" drag/|
|00003940| 73 63 72 6f 6c 6c 69 6e | 67 20 61 6e 64 20 74 68 |scrollin|g and th|
|00003950| 65 20 73 65 6c 65 63 74 | 69 6f 6e 20 6f 66 20 6c |e select|ion of l|
|00003960| 69 73 74 20 65 6c 65 6d | 65 6e 74 73 29 20 61 6e |ist elem|ents) an|
|00003970| 64 20 72 65 74 61 69 6e | 73 20 63 6f 6e 74 72 6f |d retain|s contro|
|00003980| 6c 20 75 6e 74 69 6c 20 | 74 68 65 20 6d 6f 75 73 |l until |the mous|
|00003990| 65 20 62 75 74 74 6f 6e | 20 69 73 20 72 65 6c 65 |e button| is rele|
|000039a0| 61 73 65 64 2e 0d 0d 57 | 68 65 6e 20 74 68 69 73 |ased...W|hen this|
|000039b0| 20 66 75 6e 63 74 69 6f | 6e 20 72 65 74 75 72 6e | functio|n return|
|000039c0| 73 2c 20 74 68 65 20 64 | 6f 75 62 6c 65 5f 63 6c |s, the d|ouble_cl|
|000039d0| 69 63 6b 20 70 61 72 61 | 6d 65 74 65 72 20 77 69 |ick para|meter wi|
|000039e0| 6c 6c 20 62 65 20 67 72 | 65 61 74 65 72 20 6f 72 |ll be gr|eater or|
|000039f0| 20 65 71 75 61 6c 20 74 | 6f 20 7a 65 72 6f 20 69 | equal t|o zero i|
|00003a00| 66 20 61 20 64 6f 75 62 | 6c 65 2d 63 6c 69 63 6b |f a doub|le-click|
|00003a10| 20 77 61 73 20 64 65 74 | 65 63 74 65 64 20 6f 6e | was det|ected on|
|00003a20| 20 61 20 73 69 6e 67 6c | 65 20 65 6c 65 6d 65 6e | a singl|e elemen|
|00003a30| 74 2e 0d 0d 0d 54 68 65 | 20 66 75 6e 63 74 69 6f |t....The| functio|
|00003a40| 6e 20 69 74 73 65 6c 66 | 20 77 69 6c 6c 20 72 65 |n itself| will re|
|00003a50| 74 75 72 6e 20 6f 6e 65 | 20 6f 66 20 74 68 65 20 |turn one| of the |
|00003a60| 66 6f 6c 6c 6f 77 69 6e | 67 20 76 61 6c 75 65 73 |followin|g values|
|00003a70| 3a 0d 0d 0d 30 09 6c 69 | 73 74 62 6f 78 5f 6e 6f |:...0.li|stbox_no|
|00003a80| 74 5f 69 6e 5f 6c 69 73 | 74 09 54 68 65 20 70 6f |t_in_lis|t.The po|
|00003a90| 69 6e 74 20 69 73 20 6e | 6f 74 20 69 6e 20 74 68 |int is n|ot in th|
|00003aa0| 65 20 6c 69 73 74 0d 31 | 09 6c 69 73 74 62 6f 78 |e list.1|.listbox|
|00003ab0| 5f 69 6e 5f 63 6f 6e 74 | 65 6e 74 09 54 68 65 20 |_in_cont|ent.The |
|00003ac0| 70 6f 69 6e 74 20 69 73 | 20 73 6f 6d 65 77 68 65 |point is| somewhe|
|00003ad0| 72 65 20 69 6e 20 74 68 | 65 20 6c 69 73 74 20 63 |re in th|e list c|
|00003ae0| 6f 6e 74 65 6e 74 73 0d | 32 09 6c 69 73 74 62 6f |ontents.|2.listbo|
|00003af0| 78 5f 69 6e 5f 73 63 72 | 6f 6c 6c 09 54 68 65 20 |x_in_scr|oll.The |
|00003b00| 70 6f 69 6e 74 20 69 73 | 20 73 6f 6d 65 77 68 65 |point is| somewhe|
|00003b10| 72 65 20 77 69 74 68 69 | 6e 20 74 68 65 20 6c 69 |re withi|n the li|
|00003b20| 73 74 27 73 20 73 63 72 | 6f 6c 6c 62 61 72 0d 0d |st's scr|ollbar..|
|00003b30| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 4c 69 73 |.pascal |void Lis|
|00003b40| 74 62 6f 78 41 63 74 69 | 76 61 74 65 28 63 6f 6e |tboxActi|vate(con|
|00003b50| 73 74 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |st listb|ox_handl|
|00003b60| 65 20 6c 69 73 74 29 3b | 0d 70 61 73 63 61 6c 20 |e list);|.pascal |
|00003b70| 76 6f 69 64 20 4c 69 73 | 74 62 6f 78 44 65 61 63 |void Lis|tboxDeac|
|00003b80| 74 69 76 61 74 65 28 63 | 6f 6e 73 74 20 6c 69 73 |tivate(c|onst lis|
|00003b90| 74 62 6f 78 5f 68 61 6e | 64 6c 65 20 6c 69 73 74 |tbox_han|dle list|
|00003ba0| 29 3b 0d 50 52 4f 43 45 | 44 55 52 45 20 4c 69 73 |);.PROCE|DURE Lis|
|00003bb0| 74 62 6f 78 41 63 74 69 | 76 61 74 65 28 6c 69 73 |tboxActi|vate(lis|
|00003bc0| 74 3a 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |t: listb|ox_handl|
|00003bd0| 65 29 3b 0d 50 52 4f 43 | 45 44 55 52 45 20 4c 69 |e);.PROC|EDURE Li|
|00003be0| 73 74 62 6f 78 44 65 61 | 63 74 69 76 61 74 65 28 |stboxDea|ctivate(|
|00003bf0| 6c 69 73 74 3a 20 6c 69 | 73 74 62 6f 78 5f 68 61 |list: li|stbox_ha|
|00003c00| 6e 64 6c 65 29 3b 0d 0d | 41 63 74 69 76 61 74 65 |ndle);..|Activate|
|00003c10| 73 20 6f 72 20 64 65 61 | 63 74 69 76 61 74 65 73 |s or dea|ctivates|
|00003c20| 20 61 20 6c 69 73 74 62 | 6f 78 2e 0d 0d 49 6e 20 | a listb|ox...In |
|00003c30| 6b 65 65 70 69 6e 67 20 | 77 69 74 68 20 61 20 73 |keeping |with a s|
|00003c40| 74 61 6e 64 61 72 64 20 | 4d 61 63 69 6e 74 6f 73 |tandard |Macintos|
|00003c50| 68 20 69 6e 74 65 72 66 | 61 63 65 2c 20 79 6f 75 |h interf|ace, you|
|00003c60| 20 73 68 6f 75 6c 64 20 | 61 6c 77 61 79 73 20 63 | should |always c|
|00003c70| 61 6c 6c 20 4c 69 73 74 | 62 6f 78 41 63 74 69 76 |all List|boxActiv|
|00003c80| 61 74 65 20 6f 72 20 4c | 69 73 74 62 6f 78 44 65 |ate or L|istboxDe|
|00003c90| 61 63 74 69 76 61 74 65 | 20 69 6e 20 72 65 73 70 |activate| in resp|
|00003ca0| 6f 6e 73 65 20 74 6f 20 | 61 6e 20 61 63 74 69 76 |onse to |an activ|
|00003cb0| 61 74 65 20 65 76 65 6e | 74 20 6f 63 63 75 72 72 |ate even|t occurr|
|00003cc0| 69 6e 67 20 69 6e 20 61 | 20 77 69 6e 64 6f 77 20 |ing in a| window |
|00003cd0| 74 68 61 74 20 68 61 73 | 20 6c 69 73 74 62 6f 78 |that has| listbox|
|00003ce0| 28 73 29 2e 0d 00 01 00 | 0d 00 00 00 d0 00 0d 00 |(s).....|........|
|00003cf0| 00 00 d1 00 0d 00 00 01 | 5d 00 0d 00 00 01 5e 00 |........|].....^.|
|00003d00| 0d 00 00 01 5f 00 0d 00 | 00 01 9c 00 0d 00 00 01 |...._...|........|
|00003d10| 9d 00 0d 00 00 01 9e 00 | 0d 00 00 01 a0 00 09 00 |........|........|
|00003d20| 36 01 b4 00 09 00 22 01 | d1 00 0d 00 00 01 d3 00 |6.....".|........|
|00003d30| 09 00 36 01 e6 00 09 00 | 28 02 12 00 0d 00 00 02 |..6.....|(.......|
|00003d40| 14 00 09 00 36 02 26 00 | 09 00 2e 02 59 00 0d 00 |....6.&.|....Y...|
|00003d50| 00 02 5a 00 0d 00 00 02 | 5b 00 0d 00 00 02 93 00 |..Z.....|[.......|
|00003d60| 0d 00 00 02 cd 00 0d 00 | 00 02 fe 00 0d 00 00 03 |........|........|
|00003d70| 31 00 0d 00 00 03 32 00 | 0d 00 00 03 56 00 0d 00 |1.....2.|....V...|
|00003d80| 00 03 57 00 0d 00 00 04 | 0f 00 0d 00 00 00 04 10 |..W.....|........|
|00003d90| 00 0d 00 00 0d 49 66 20 | 74 68 65 20 61 63 74 69 |.....If |the acti|
|00003da0| 76 61 74 65 20 65 76 65 | 6e 74 20 69 6e 64 69 63 |vate eve|nt indic|
|00003db0| 61 74 65 73 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |ates the| window |
|00003dc0| 69 73 20 67 6f 69 6e 67 | 20 69 6e 61 63 74 69 76 |is going| inactiv|
|00003dd0| 65 2c 20 63 61 6c 6c 20 | 4c 69 73 74 62 6f 78 44 |e, call |ListboxD|
|00003de0| 65 61 63 74 69 76 61 74 | 65 20 66 6f 72 20 65 61 |eactivat|e for ea|
|00003df0| 63 68 20 6c 69 73 74 62 | 6f 78 20 69 6e 20 74 68 |ch listb|ox in th|
|00003e00| 65 20 77 69 6e 64 6f 77 | 2c 20 70 61 73 73 69 6e |e window|, passin|
|00003e10| 67 20 74 68 65 20 6c 69 | 73 74 5f 68 61 6e 64 6c |g the li|st_handl|
|00003e20| 65 20 69 6e 20 6c 69 73 | 74 3b 20 20 69 66 20 74 |e in lis|t; if t|
|00003e30| 68 65 20 61 63 74 69 76 | 61 74 65 20 65 76 65 6e |he activ|ate even|
|00003e40| 74 20 69 6e 64 69 63 61 | 74 65 73 20 74 68 65 20 |t indica|tes the |
|00003e50| 77 69 6e 64 6f 77 20 67 | 6f 69 6e 67 20 61 63 74 |window g|oing act|
|00003e60| 69 76 65 2c 20 63 61 6c | 6c 20 4c 69 73 74 62 6f |ive, cal|l Listbo|
|00003e70| 78 41 63 74 69 76 61 74 | 65 20 66 6f 72 20 65 61 |xActivat|e for ea|
|00003e80| 63 68 20 6c 69 73 74 62 | 6f 78 2e 0d 0d 0d 0d 70 |ch listb|ox.....p|
|00003e90| 61 73 63 61 6c 20 76 6f | 69 64 20 4c 69 73 74 62 |ascal vo|id Listb|
|00003ea0| 6f 78 4b 65 79 28 63 6f | 6e 73 74 20 6c 69 73 74 |oxKey(co|nst list|
|00003eb0| 62 6f 78 5f 68 61 6e 64 | 6c 65 20 6c 69 73 74 2c |box_hand|le list,|
|00003ec0| 20 63 6f 6e 73 74 20 45 | 76 65 6e 74 52 65 63 6f | const E|ventReco|
|00003ed0| 72 64 20 09 09 2a 65 76 | 65 6e 74 29 3b 0d 50 52 |rd ..*ev|ent);.PR|
|00003ee0| 4f 43 45 44 55 52 45 20 | 4c 69 73 74 62 6f 78 4b |OCEDURE |ListboxK|
|00003ef0| 65 79 28 6c 69 73 74 3a | 20 6c 69 73 74 62 6f 78 |ey(list:| listbox|
|00003f00| 5f 68 61 6e 64 6c 65 3b | 20 65 76 65 6e 74 3a 20 |_handle;| event: |
|00003f10| 45 76 65 6e 74 52 65 63 | 6f 72 64 29 3b 0d 0d 48 |EventRec|ord);..H|
|00003f20| 61 6e 64 6c 65 73 20 61 | 20 6b 65 79 44 6f 77 6e |andles a| keyDown|
|00003f30| 20 65 76 65 6e 74 20 66 | 6f 72 20 61 20 6c 69 73 | event f|or a lis|
|00003f40| 74 62 6f 78 2e 0d 0d 4c | 69 73 74 62 6f 78 4b 65 |tbox...L|istboxKe|
|00003f50| 79 20 63 61 75 73 65 73 | 20 61 20 6c 6f 63 61 74 |y causes| a locat|
|00003f60| 69 6e 67 20 22 73 65 61 | 72 63 68 22 20 74 6f 20 |ing "sea|rch" to |
|00003f70| 62 65 20 70 65 72 66 6f | 72 6d 65 64 20 6f 6e 20 |be perfo|rmed on |
|00003f80| 61 20 6c 69 73 74 20 69 | 6e 20 73 75 63 68 20 61 |a list i|n such a|
|00003f90| 20 77 61 79 20 74 68 61 | 74 20 61 20 75 73 65 72 | way tha|t a user|
|00003fa0| 20 63 6f 75 6c 64 20 6c | 6f 63 61 74 65 20 61 6e | could l|ocate an|
|00003fb0| 20 65 6c 65 6d 65 6e 74 | 20 69 6e 20 61 20 6c 69 | element| in a li|
|00003fc0| 73 74 62 6f 78 20 62 79 | 20 74 79 70 69 6e 67 20 |stbox by| typing |
|00003fd0| 74 68 65 20 66 69 72 73 | 74 20 66 65 77 20 6d 61 |the firs|t few ma|
|00003fe0| 74 63 68 69 6e 67 20 63 | 68 61 72 61 63 74 65 72 |tching c|haracter|
|00003ff0| 73 3a 20 20 74 79 70 69 | 6e 67 20 22 55 6e 69 2c |s: typi|ng "Uni,|
|00004000| 22 20 66 6f 72 20 69 6e | 73 74 61 6e 63 65 2c 20 |" for in|stance, |
|00004010| 6d 69 67 68 74 20 6c 6f | 63 61 74 65 20 74 68 65 |might lo|cate the|
|00004020| 20 66 69 72 73 74 20 6f | 63 63 75 72 72 65 6e 63 | first o|ccurrenc|
|00004030| 65 20 6f 66 20 22 55 6e | 69 74 65 64 20 53 74 61 |e of "Un|ited Sta|
|00004040| 74 65 73 2c 22 20 6f 72 | 20 74 79 70 69 6e 67 20 |tes," or| typing |
|00004050| 22 42 72 22 20 6d 69 67 | 68 74 20 6c 6f 63 61 74 |"Br" mig|ht locat|
|00004060| 65 20 74 68 65 20 66 69 | 72 73 74 20 6f 63 63 75 |e the fi|rst occu|
|00004070| 72 72 65 6e 63 65 20 6f | 66 20 22 42 72 6f 77 6e |rrence o|f "Brown|
|00004080| 2c 22 20 65 74 63 2e 0d | 0d 41 72 72 6f 77 20 6b |," etc..|.Arrow k|
|00004090| 65 79 73 20 61 72 65 20 | 61 6c 73 6f 20 73 75 70 |eys are |also sup|
|000040a0| 70 6f 72 74 65 64 2c 20 | 73 6f 20 65 76 65 6e 20 |ported, |so even |
|000040b0| 69 66 20 61 20 73 65 61 | 72 63 68 20 69 73 20 6e |if a sea|rch is n|
|000040c0| 6f 74 20 61 20 72 65 71 | 75 69 72 65 6d 65 6e 74 |ot a req|uirement|
|000040d0| 20 79 6f 75 20 73 74 69 | 6c 6c 20 6d 61 79 20 77 | you sti|ll may w|
|000040e0| 69 73 68 20 74 6f 20 75 | 73 65 20 4c 69 73 74 62 |ish to u|se Listb|
|000040f0| 6f 78 4b 65 79 20 74 6f | 20 72 65 73 70 6f 6e 64 |oxKey to| respond|
|00004100| 20 61 70 70 72 6f 70 72 | 69 61 74 65 6c 79 20 74 | appropr|iately t|
|00004110| 6f 20 75 70 20 61 6e 64 | 20 64 6f 77 6e 20 61 72 |o up and| down ar|
|00004120| 72 6f 77 73 2e 0d 0d 00 | 01 00 0d 00 00 00 f8 00 |rows....|........|
|00004130| 0d 00 00 00 f9 00 0d 00 | 00 00 fa 00 0d 00 00 00 |........|........|
|00004140| fb 00 0d 00 00 01 40 00 | 09 00 0e 01 41 00 09 00 |......@.|....A...|
|00004150| 72 01 4a 00 0d 00 00 01 | 8a 00 0d 00 00 01 8b 00 |r.J.....|........|
|00004160| 0d 00 00 01 b2 00 0d 00 | 00 01 b3 00 0d 00 00 02 |........|........|
|00004170| f4 00 0d 00 00 02 f5 00 | 0d 00 00 03 92 00 0d 00 |........|........|
|00004180| 00 03 93 00 0d 00 00 0d | 0d 70 61 73 63 61 6c 20 |........|.pascal |
|00004190| 6c 69 73 74 62 6f 78 5f | 6c 6f 63 61 74 69 6f 6e |listbox_|location|
|000041a0| 5f 74 20 4c 69 73 74 62 | 6f 78 46 69 6e 64 50 6f |_t Listb|oxFindPo|
|000041b0| 69 6e 74 28 63 6f 6e 73 | 74 20 6c 69 73 74 62 6f |int(cons|t listbo|
|000041c0| 78 5f 68 61 6e 64 6c 65 | 20 6c 69 73 74 2c 0d 09 |x_handle| list,..|
|000041d0| 50 6f 69 6e 74 20 70 29 | 3b 0d 46 55 4e 43 54 49 |Point p)|;.FUNCTI|
|000041e0| 4f 4e 20 4c 69 73 74 62 | 6f 78 46 69 6e 64 50 6f |ON Listb|oxFindPo|
|000041f0| 69 6e 74 28 6c 69 73 74 | 3a 20 6c 69 73 74 62 6f |int(list|: listbo|
|00004200| 78 5f 68 61 6e 64 6c 65 | 3b 0d 09 70 3a 20 50 6f |x_handle|;..p: Po|
|00004210| 69 6e 74 29 20 3a 20 49 | 4e 54 45 47 45 52 3b 0d |int) : I|NTEGER;.|
|00004220| 0d 44 65 74 65 72 6d 69 | 6e 65 73 20 77 68 61 74 |.Determi|nes what|
|00004230| 20 70 61 72 74 2c 20 69 | 66 20 61 6e 79 2c 20 6f | part, i|f any, o|
|00004240| 66 20 61 20 6c 69 73 74 | 62 6f 78 20 63 6f 6e 74 |f a list|box cont|
|00004250| 61 69 6e 73 20 61 20 73 | 70 65 63 69 66 69 63 20 |ains a s|pecific |
|00004260| 70 6f 69 6e 74 2e 0d 0d | 54 68 65 20 74 79 70 69 |point...|The typi|
|00004270| 63 61 6c 20 75 73 65 20 | 6f 66 20 4c 69 73 74 62 |cal use |of Listb|
|00004280| 6f 78 46 69 6e 64 50 6f | 69 6e 74 20 69 73 20 74 |oxFindPo|int is t|
|00004290| 6f 20 64 65 63 69 64 65 | 20 69 66 20 74 68 65 20 |o decide| if the |
|000042a0| 6d 6f 75 73 65 20 69 73 | 20 63 75 72 72 65 6e 74 |mouse is| current|
|000042b0| 6c 79 20 6f 76 65 72 20 | 74 68 65 20 6c 69 73 74 |ly over |the list|
|000042c0| 62 6f 78 20 61 72 65 61 | 20 28 74 6f 20 63 68 61 |box area| (to cha|
|000042d0| 6e 67 65 20 74 68 65 20 | 63 75 72 73 6f 72 20 66 |nge the |cursor f|
|000042e0| 6f 72 20 65 78 61 6d 70 | 6c 65 29 2e 0d 0d 4c 69 |or examp|le)...Li|
|000042f0| 73 74 62 6f 78 46 69 6e | 64 50 6f 69 6e 74 20 77 |stboxFin|dPoint w|
|00004300| 69 6c 6c 20 63 68 65 63 | 6b 20 61 6c 6c 20 70 61 |ill chec|k all pa|
|00004310| 72 74 73 20 6f 66 20 6c | 69 73 74 20 28 69 6e 63 |rts of l|ist (inc|
|00004320| 6c 75 64 69 6e 67 20 74 | 68 65 20 73 63 72 6f 6c |luding t|he scrol|
|00004330| 6c 62 61 72 29 20 74 6f | 20 73 65 65 20 69 66 20 |lbar) to| see if |
|00004340| 61 6e 79 20 6f 66 20 74 | 68 6f 73 65 20 70 61 72 |any of t|hose par|
|00004350| 74 73 20 63 6f 6e 74 61 | 69 6e 20 50 6f 69 6e 74 |ts conta|in Point|
|00004360| 20 70 20 28 77 68 69 63 | 68 20 6d 75 73 74 20 62 | p (whic|h must b|
|00004370| 65 20 67 69 76 65 6e 20 | 69 6e 20 6c 6f 63 61 6c |e given |in local|
|00004380| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 6f 66 20 | coordin|ates of |
|00004390| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 6e 20 77 68 |the wind|ow in wh|
|000043a0| 69 63 68 20 6c 69 73 74 | 20 77 61 73 20 63 72 65 |ich list| was cre|
|000043b0| 61 74 65 64 29 2e 20 20 | 41 73 20 61 20 72 65 73 |ated). |As a res|
|000043c0| 75 6c 74 2c 20 74 68 65 | 20 66 75 6e 63 74 69 6f |ult, the| functio|
|000043d0| 6e 20 77 69 6c 6c 20 72 | 65 74 75 72 6e 20 6f 6e |n will r|eturn on|
|000043e0| 65 20 6f 66 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |e of the| followi|
|000043f0| 6e 67 3a 0d 0d 0d 30 09 | 6c 69 73 74 62 6f 78 5f |ng:...0.|listbox_|
|00004400| 6e 6f 74 5f 69 6e 5f 6c | 69 73 74 09 54 68 65 20 |not_in_l|ist.The |
|00004410| 70 6f 69 6e 74 20 69 73 | 20 6e 6f 74 20 69 6e 20 |point is| not in |
|00004420| 74 68 65 20 6c 69 73 74 | 0d 31 09 6c 69 73 74 62 |the list|.1.listb|
|00004430| 6f 78 5f 69 6e 5f 63 6f | 6e 74 65 6e 74 09 54 68 |ox_in_co|ntent.Th|
|00004440| 65 20 70 6f 69 6e 74 20 | 69 73 20 73 6f 6d 65 77 |e point |is somew|
|00004450| 68 65 72 65 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |here in |the list|
|00004460| 20 63 6f 6e 74 65 6e 74 | 73 0d 32 09 6c 69 73 74 | content|s.2.list|
|00004470| 62 6f 78 5f 69 6e 5f 73 | 63 72 6f 6c 6c 09 54 68 |box_in_s|croll.Th|
|00004480| 65 20 70 6f 69 6e 74 20 | 69 73 20 73 6f 6d 65 77 |e point |is somew|
|00004490| 68 65 72 65 20 77 69 74 | 68 69 6e 20 74 68 65 20 |here wit|hin the |
|000044a0| 6c 69 73 74 27 73 20 73 | 63 72 6f 6c 6c 62 61 72 |list's s|crollbar|
|000044b0| 0d 0d 49 66 20 79 6f 75 | 20 6e 65 65 64 20 74 6f |..If you| need to|
|000044c0| 20 63 68 65 63 6b 20 6d | 6f 72 65 20 74 68 61 6e | check m|ore than|
|000044d0| 20 6f 6e 65 20 6c 69 73 | 74 20 69 6e 20 74 68 65 | one lis|t in the|
|000044e0| 20 73 61 6d 65 20 77 69 | 6e 64 6f 77 2c 20 79 6f | same wi|ndow, yo|
|000044f0| 75 20 77 69 6c 6c 20 6e | 65 65 64 20 74 6f 20 64 |u will n|eed to d|
|00004500| 6f 20 61 20 4c 69 73 74 | 62 6f 78 46 69 6e 64 50 |o a List|boxFindP|
|00004510| 6f 69 6e 74 20 66 6f 72 | 20 65 61 63 68 20 6c 69 |oint for| each li|
|00004520| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 20 75 6e 74 |stbox_ha|ndle unt|
|00004530| 69 6c 20 6f 6e 65 20 6f | 66 20 74 68 65 6d 2c 20 |il one o|f them, |
|00004540| 69 66 20 61 6e 79 2c 20 | 20 63 6f 6e 74 61 69 6e |if any, | contain|
|00004550| 73 20 74 68 65 20 70 6f | 69 6e 74 2e 0d 20 20 0c |s the po|int.. .|
|00004560| 0d 00 01 00 0d 00 00 00 | 02 00 0d 00 00 00 48 00 |........|......H.|
|00004570| 0d 00 00 00 49 00 09 00 | 72 00 53 00 0d 00 00 00 |....I...|r.S.....|
|00004580| 83 00 0d 00 00 00 84 00 | 09 00 72 00 99 00 0d 00 |........|..r.....|
|00004590| 00 00 9a 00 0d 00 00 00 | e0 00 0d 00 00 00 e1 00 |........|........|
|000045a0| 0d 00 00 01 66 00 0d 00 | 00 01 67 00 0d 00 00 02 |....f...|..g.....|
|000045b0| 6d 00 0d 00 00 02 6e 00 | 0d 00 00 02 6f 00 0d 00 |m.....n.|....o...|
|000045c0| 00 02 71 00 09 00 36 02 | 85 00 09 00 22 02 a2 00 |..q...6.|...."...|
|000045d0| 0d 00 00 02 a4 00 09 00 | 36 02 b7 00 09 00 28 02 |........|6.....(.|
|000045e0| e3 00 0d 00 00 02 e5 00 | 09 00 36 02 f7 00 09 00 |........|..6.....|
|000045f0| 2e 03 2a 00 0d 00 00 03 | 2b 00 0d 00 00 03 d6 00 |..*.....|+.......|
|00004600| 0d 00 00 03 d9 00 0c 00 | 00 03 da 00 0d 00 00 0d |........|........|
|00004610| 4c 69 73 74 20 41 70 70 | 65 61 72 61 6e 63 65 0d |List App|earance.|
|00004620| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 4c 69 73 |.pascal |void Lis|
|00004630| 74 62 6f 78 43 68 61 6e | 67 65 46 6f 6e 74 28 6c |tboxChan|geFont(l|
|00004640| 69 73 74 62 6f 78 5f 68 | 61 6e 64 6c 65 20 6c 69 |istbox_h|andle li|
|00004650| 73 74 2c 20 73 68 6f 72 | 74 20 66 6f 6e 74 5f 69 |st, shor|t font_i|
|00004660| 64 2c 0d 09 73 68 6f 72 | 74 20 73 69 7a 65 2c 20 |d,..shor|t size, |
|00004670| 73 68 6f 72 74 20 66 61 | 63 65 29 3b 0d 70 61 73 |short fa|ce);.pas|
|00004680| 63 61 6c 20 76 6f 69 64 | 20 4c 69 73 74 62 6f 78 |cal void| Listbox|
|00004690| 43 68 61 6e 67 65 4d 61 | 72 6b 46 6f 6e 74 28 6c |ChangeMa|rkFont(l|
|000046a0| 69 73 74 62 6f 78 5f 68 | 61 6e 64 6c 65 20 6c 69 |istbox_h|andle li|
|000046b0| 73 74 2c 20 73 68 6f 72 | 74 20 66 6f 6e 74 5f 69 |st, shor|t font_i|
|000046c0| 64 2c 0d 09 73 68 6f 72 | 74 20 73 69 7a 65 2c 20 |d,..shor|t size, |
|000046d0| 73 68 6f 72 74 20 66 61 | 63 65 29 3b 0d 50 52 4f |short fa|ce);.PRO|
|000046e0| 43 45 44 55 52 45 20 4c | 69 73 74 62 6f 78 43 68 |CEDURE L|istboxCh|
|000046f0| 61 6e 67 65 46 6f 6e 74 | 28 6c 69 73 74 3a 20 6c |angeFont|(list: l|
|00004700| 69 73 74 62 6f 78 5f 68 | 61 6e 64 6c 65 3b 20 66 |istbox_h|andle; f|
|00004710| 6f 6e 74 5f 69 64 3a 0d | 09 49 4e 54 45 47 45 52 |ont_id:.|.INTEGER|
|00004720| 3b 20 73 69 7a 65 3a 20 | 49 4e 54 45 47 45 52 3b |; size: |INTEGER;|
|00004730| 20 66 61 63 65 3a 20 49 | 4e 54 45 47 45 52 29 3b | face: I|NTEGER);|
|00004740| 0d 50 52 4f 43 45 44 55 | 52 45 20 4c 69 73 74 62 |.PROCEDU|RE Listb|
|00004750| 6f 78 43 68 61 6e 67 65 | 4d 61 72 6b 46 6f 6e 74 |oxChange|MarkFont|
|00004760| 28 6c 69 73 74 3a 20 6c | 69 73 74 62 6f 78 5f 68 |(list: l|istbox_h|
|00004770| 61 6e 64 6c 65 3b 0d 09 | 66 6f 6e 74 5f 69 64 3a |andle;..|font_id:|
|00004780| 20 49 4e 54 45 47 45 52 | 3b 20 73 69 7a 65 3a 20 | INTEGER|; size: |
|00004790| 49 4e 54 45 47 45 52 3b | 20 66 61 63 65 3a 20 49 |INTEGER;| face: I|
|000047a0| 4e 54 45 47 45 52 29 3b | 0d 0d 43 68 61 6e 67 65 |NTEGER);|..Change|
|000047b0| 73 20 74 68 65 20 66 6f | 6e 74 2c 20 70 6f 69 6e |s the fo|nt, poin|
|000047c0| 74 20 73 69 7a 65 20 61 | 6e 64 20 73 74 79 6c 65 |t size a|nd style|
|000047d0| 20 6f 66 20 61 6c 6c 20 | 74 68 65 20 65 6c 65 6d | of all |the elem|
|000047e0| 65 6e 74 73 20 6f 72 20 | 65 6c 65 6d 65 6e 74 20 |ents or |element |
|000047f0| 6d 61 72 6b 73 20 69 6e | 20 61 20 6c 69 73 74 62 |marks in| a listb|
|00004800| 6f 78 2e 0d 0d 57 68 65 | 6e 20 61 20 6c 69 73 74 |ox...Whe|n a list|
|00004810| 20 69 73 20 66 69 72 73 | 74 20 63 72 65 61 74 65 | is firs|t create|
|00004820| 64 2c 20 61 6c 6c 20 65 | 6c 65 6d 65 6e 74 73 20 |d, all e|lements |
|00004830| 77 69 6c 6c 20 6e 6f 72 | 6d 61 6c 6c 79 20 64 69 |will nor|mally di|
|00004840| 73 70 6c 61 79 20 69 6e | 20 74 68 65 20 64 65 66 |splay in| the def|
|00004850| 61 75 6c 74 20 66 6f 72 | 6d 61 74 20 28 77 68 69 |ault for|mat (whi|
|00004860| 63 68 20 69 73 20 43 68 | 69 63 61 67 6f 20 31 32 |ch is Ch|icago 12|
|00004870| 20 70 6f 69 6e 74 20 74 | 65 78 74 29 2e 20 20 49 | point t|ext). I|
|00004880| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 63 68 |f you wa|nt to ch|
|00004890| 61 6e 67 65 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |ange the| format |
|000048a0| 74 6f 20 73 6f 6d 65 74 | 68 69 6e 67 20 65 6c 73 |to somet|hing els|
|000048b0| 65 2c 20 4c 69 73 74 62 | 6f 78 43 68 61 6e 67 65 |e, Listb|oxChange|
|000048c0| 46 6f 6e 74 20 77 69 6c | 6c 20 63 68 61 6e 67 65 |Font wil|l change|
|000048d0| 20 74 68 65 20 74 65 78 | 74 20 66 6f 72 6d 61 74 | the tex|t format|
|000048e0| 20 66 6f 72 20 74 68 65 | 20 64 61 74 61 20 65 6c | for the| data el|
|000048f0| 65 6d 65 6e 74 73 20 61 | 6e 64 20 4c 69 73 74 62 |ements a|nd Listb|
|00004900| 6f 78 43 68 61 6e 67 65 | 4d 61 72 6b 46 6f 6e 74 |oxChange|MarkFont|
|00004910| 20 77 69 6c 6c 20 63 68 | 61 6e 67 65 20 74 68 65 | will ch|ange the|
|00004920| 20 66 6f 72 6d 61 74 20 | 66 6f 72 20 65 6c 65 6d | format |for elem|
|00004930| 65 6e 74 20 6d 61 72 6b | 73 2e 0d 0d 00 01 00 0d |ent mark|s.......|
|00004940| 00 00 00 11 00 0d 00 00 | 00 12 00 0d 00 00 00 54 |........|.......T|
|00004950| 00 0d 00 00 00 55 00 09 | 00 72 00 6e 00 0d 00 00 |.....U..|.r.n....|
|00004960| 00 b4 00 0d 00 00 00 b5 | 00 09 00 72 00 ce 00 0d |........|...r....|
|00004970| 00 00 01 09 00 0d 00 00 | 01 0a 00 09 00 72 01 32 |........|.....r.2|
|00004980| 00 0d 00 00 01 68 00 0d | 00 00 01 69 00 09 00 72 |.....h..|...i...r|
|00004990| 01 9a 00 0d 00 00 01 9b | 00 0d 00 00 01 f5 00 0d |........|........|
|000049a0| 00 00 01 f6 00 0d 00 00 | 03 2c 00 0d 00 00 03 2d |........|.,.....-|
|000049b0| 00 0d 00 00 54 68 65 20 | 62 6f 74 74 6f 6d 20 6f |....The |bottom o|
|000049c0| 66 20 74 68 65 20 6c 69 | 73 74 62 6f 78 20 77 69 |f the li|stbox wi|
|000049d0| 6c 6c 20 63 68 61 6e 67 | 65 20 28 6d 6f 76 65 29 |ll chang|e (move)|
|000049e0| 20 74 6f 20 61 64 6a 75 | 73 74 20 74 6f 20 74 68 | to adju|st to th|
|000049f0| 65 20 6e 65 78 74 20 65 | 6c 65 6d 65 6e 74 20 73 |e next e|lement s|
|00004a00| 69 7a 65 2c 20 69 66 20 | 61 70 70 72 6f 70 72 69 |ize, if |appropri|
|00004a10| 61 74 65 2e 20 49 66 20 | 61 6e 20 61 64 6a 75 73 |ate. If |an adjus|
|00004a20| 74 6d 65 6e 74 20 6f 63 | 63 75 72 73 2c 20 74 68 |tment oc|curs, th|
|00004a30| 65 20 68 65 69 67 68 74 | 20 6f 66 20 74 68 65 20 |e height| of the |
|00004a40| 6c 69 73 74 62 6f 78 20 | 77 69 6c 6c 20 61 6c 77 |listbox |will alw|
|00004a50| 61 79 73 20 64 65 63 72 | 65 61 73 65 20 28 6e 65 |ays decr|ease (ne|
|00004a60| 76 65 72 20 69 6e 63 72 | 65 61 73 65 29 20 74 6f |ver incr|ease) to|
|00004a70| 20 61 76 6f 69 64 20 64 | 72 61 77 69 6e 67 20 6f | avoid d|rawing o|
|00004a80| 6e 6c 79 20 61 20 70 61 | 72 74 69 61 6c 20 65 6c |nly a pa|rtial el|
|00004a90| 65 6d 65 6e 74 2e 0d 0d | 48 6f 77 65 76 65 72 2c |ement...|However,|
|00004aa0| 20 74 68 65 20 65 78 69 | 73 74 69 6e 67 20 65 6c | the exi|sting el|
|00004ab0| 65 6d 65 6e 74 73 20 61 | 72 65 20 6e 6f 74 20 72 |ements a|re not r|
|00004ac0| 65 2d 64 72 61 77 6e 2c | 20 62 75 74 20 72 61 74 |e-drawn,| but rat|
|00004ad0| 68 65 72 20 74 68 65 20 | 6c 69 73 74 62 6f 78 20 |her the |listbox |
|00004ae0| 61 72 65 61 20 69 73 20 | 69 6e 76 61 6c 69 64 61 |area is |invalida|
|00004af0| 74 65 64 20 73 6f 20 69 | 74 20 77 69 6c 6c 20 62 |ted so i|t will b|
|00004b00| 65 20 72 65 2d 64 72 61 | 77 6e 20 64 75 72 69 6e |e re-dra|wn durin|
|00004b10| 67 20 74 68 65 20 6e 65 | 78 74 20 75 70 64 61 74 |g the ne|xt updat|
|00004b20| 65 20 65 76 65 6e 74 2e | 0d 0d 0d 70 61 73 63 61 |e event.|...pasca|
|00004b30| 6c 20 76 6f 69 64 20 4c | 69 73 74 62 6f 78 43 68 |l void L|istboxCh|
|00004b40| 61 6e 67 65 43 6f 6c 6f | 72 28 6c 69 73 74 62 6f |angeColo|r(listbo|
|00004b50| 78 5f 68 61 6e 64 6c 65 | 20 6c 69 73 74 2c 0d 09 |x_handle| list,..|
|00004b60| 63 6f 6e 73 74 20 52 47 | 42 43 6f 6c 6f 72 20 2a |const RG|BColor *|
|00004b70| 63 6f 6c 6f 72 29 3b 0d | 50 52 4f 43 45 44 55 52 |color);.|PROCEDUR|
|00004b80| 45 20 4c 69 73 74 62 6f | 78 43 68 61 6e 67 65 43 |E Listbo|xChangeC|
|00004b90| 6f 6c 6f 72 28 6c 69 73 | 74 3a 20 6c 69 73 74 62 |olor(lis|t: listb|
|00004ba0| 6f 78 5f 68 61 6e 64 6c | 65 3b 20 63 6f 6c 6f 72 |ox_handl|e; color|
|00004bb0| 3a 20 52 47 42 43 6f 6c | 6f 72 29 3b 0d 09 4c 69 |: RGBCol|or);..Li|
|00004bc0| 73 74 62 6f 78 43 68 61 | 6e 67 65 43 6f 6c 6f 72 |stboxCha|ngeColor|
|00004bd0| 0d 0d 43 68 61 6e 67 65 | 73 20 74 68 65 20 74 65 |..Change|s the te|
|00004be0| 78 74 20 63 6f 6c 6f 72 | 20 6f 66 20 61 6c 6c 20 |xt color| of all |
|00004bf0| 65 6c 65 6d 65 6e 74 73 | 20 69 6e 20 61 20 6c 69 |elements| in a li|
|00004c00| 73 74 2e 0d 0d 4c 69 73 | 74 62 6f 78 43 68 61 6e |st...Lis|tboxChan|
|00004c10| 67 65 43 6f 6c 6f 72 20 | 63 68 61 6e 67 65 73 20 |geColor |changes |
|00004c20| 74 68 65 20 66 6f 72 65 | 67 72 6f 75 6e 64 20 74 |the fore|ground t|
|00004c30| 65 78 74 20 63 6f 6c 6f | 72 20 74 6f 20 52 47 42 |ext colo|r to RGB|
|00004c40| 43 6f 6c 6f 72 20 63 6f | 6c 6f 72 20 6f 66 20 61 |Color co|lor of a|
|00004c50| 6c 6c 20 65 6c 65 6d 65 | 6e 74 73 20 28 62 6f 74 |ll eleme|nts (bot|
|00004c60| 68 20 64 61 74 61 20 65 | 6c 65 6d 65 6e 74 73 20 |h data e|lements |
|00004c70| 61 6e 64 20 65 6c 65 6d | 65 6e 74 20 6d 61 72 6b |and elem|ent mark|
|00004c80| 73 29 20 69 6e 20 6c 69 | 73 74 20 61 6e 64 20 74 |s) in li|st and t|
|00004c90| 68 65 20 63 6f 6c 6f 72 | 20 6f 66 20 61 6c 6c 20 |he color| of all |
|00004ca0| 66 75 74 75 72 65 20 65 | 6c 65 6d 65 6e 74 73 20 |future e|lements |
|00004cb0| 61 64 64 65 64 20 74 6f | 20 74 68 69 73 20 6c 69 |added to| this li|
|00004cc0| 73 74 2e 0d 00 e3 00 0d | 00 00 00 e4 00 0d 00 00 |st......|........|
|00004cd0| 01 75 00 0d 00 00 01 76 | 00 0d 00 00 01 77 00 0d |.u.....v|.....w..|
|00004ce0| 00 00 01 ab 00 0d 00 00 | 01 ac 00 09 00 72 01 c4 |........|.....r..|
|00004cf0| 00 0d 00 00 02 09 00 0d | 00 00 02 0a 00 09 00 72 |........|.......r|
|00004d00| 02 1d 00 0d 00 00 02 1e | 00 0d 00 00 02 50 00 0d |........|.....P..|
|00004d10| 00 00 02 51 00 0d 00 00 | 03 10 00 0d 00 00 0d 49 |...Q....|.......I|
|00004d20| 66 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 20 69 |f your p|rogram i|
|00004d30| 73 20 72 75 6e 6e 69 6e | 67 20 69 6e 20 61 20 6d |s runnin|g in a m|
|00004d40| 61 63 68 69 6e 65 20 74 | 68 61 74 20 64 6f 65 73 |achine t|hat does|
|00004d50| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 20 43 6f 6c | not sup|port Col|
|00004d60| 6f 72 20 51 75 69 63 6b | 64 72 61 77 2c 20 4c 69 |or Quick|draw, Li|
|00004d70| 73 74 62 6f 78 43 68 61 | 6e 67 65 43 6f 6c 6f 72 |stboxCha|ngeColor|
|00004d80| 20 77 6f 6e 27 74 20 63 | 72 61 73 68 2c 20 62 75 | won't c|rash, bu|
|00004d90| 74 20 74 68 65 20 74 65 | 78 74 20 77 69 6c 6c 20 |t the te|xt will |
|00004da0| 6e 6f 74 20 63 68 61 6e | 67 65 20 63 6f 6c 6f 72 |not chan|ge color|
|00004db0| 2e 0d 0d 0d 53 65 6c 65 | 63 74 69 6f 6e 0d 0d 70 |....Sele|ction..p|
|00004dc0| 61 73 63 61 6c 20 6c 6f | 6e 67 20 4c 69 73 74 62 |ascal lo|ng Listb|
|00004dd0| 6f 78 45 6c 65 6d 65 6e | 74 51 74 79 28 63 6f 6e |oxElemen|tQty(con|
|00004de0| 73 74 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |st listb|ox_handl|
|00004df0| 65 20 6c 69 73 74 29 3b | 0d 70 61 73 63 61 6c 20 |e list);|.pascal |
|00004e00| 6c 6f 6e 67 20 4c 69 73 | 74 62 6f 78 47 65 74 53 |long Lis|tboxGetS|
|00004e10| 65 6c 65 63 74 65 64 51 | 74 79 28 63 6f 6e 73 74 |electedQ|ty(const|
|00004e20| 20 6c 69 73 74 62 6f 78 | 5f 68 61 6e 64 6c 65 20 | listbox|_handle |
|00004e30| 6c 69 73 74 29 3b 0d 46 | 55 4e 43 54 49 4f 4e 20 |list);.F|UNCTION |
|00004e40| 4c 69 73 74 62 6f 78 45 | 6c 65 6d 65 6e 74 51 74 |ListboxE|lementQt|
|00004e50| 79 28 6c 69 73 74 3a 20 | 6c 69 73 74 62 6f 78 5f |y(list: |listbox_|
|00004e60| 68 61 6e 64 6c 65 29 20 | 3a 20 4c 4f 4e 47 49 4e |handle) |: LONGIN|
|00004e70| 54 3b 0d 46 55 4e 43 54 | 49 4f 4e 20 4c 69 73 74 |T;.FUNCT|ION List|
|00004e80| 62 6f 78 47 65 74 53 65 | 6c 65 63 74 65 64 51 74 |boxGetSe|lectedQt|
|00004e90| 79 28 6c 69 73 74 3a 20 | 6c 69 73 74 62 6f 78 5f |y(list: |listbox_|
|00004ea0| 68 61 6e 64 6c 65 29 20 | 3a 20 4c 4f 4e 47 49 4e |handle) |: LONGIN|
|00004eb0| 54 3b 0d 0d 52 65 74 75 | 72 6e 73 20 74 68 65 20 |T;..Retu|rns the |
|00004ec0| 74 6f 74 61 6c 20 6e 75 | 6d 62 65 72 20 6f 66 20 |total nu|mber of |
|00004ed0| 65 6c 65 6d 65 6e 74 73 | 20 69 6e 20 61 20 6c 69 |elements| in a li|
|00004ee0| 73 74 20 28 6f 72 20 74 | 68 65 20 74 6f 74 61 6c |st (or t|he total|
|00004ef0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 73 65 6c 65 63 | number |of selec|
|00004f00| 74 65 64 20 65 6c 65 6d | 65 6e 74 73 29 20 2e 0d |ted elem|ents) ..|
|00004f10| 0d 4c 69 73 74 62 6f 78 | 45 6c 65 6d 65 6e 74 51 |.Listbox|ElementQ|
|00004f20| 74 79 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 74 |ty retur|ns the t|
|00004f30| 6f 74 61 6c 20 6e 75 6d | 62 65 72 20 6f 66 20 65 |otal num|ber of e|
|00004f40| 6c 65 6d 65 6e 74 73 20 | 69 6e 20 6c 69 73 74 20 |lements |in list |
|00004f50| 72 65 67 61 72 64 6c 65 | 73 73 20 6f 66 20 77 68 |regardle|ss of wh|
|00004f60| 65 74 68 65 72 20 6f 72 | 20 6e 6f 74 20 61 6e 79 |ether or| not any|
|00004f70| 20 65 6c 65 6d 65 6e 74 | 73 20 61 72 65 20 73 65 | element|s are se|
|00004f80| 6c 65 63 74 65 64 2e 0d | 0d 4c 69 73 74 62 6f 78 |lected..|.Listbox|
|00004f90| 47 65 74 53 65 6c 65 63 | 74 65 64 51 74 79 20 72 |GetSelec|tedQty r|
|00004fa0| 65 74 75 72 6e 73 20 74 | 68 65 20 74 6f 74 61 6c |eturns t|he total|
|00004fb0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 73 65 6c 65 63 | number |of selec|
|00004fc0| 74 65 64 20 65 6c 65 6d | 65 6e 74 73 20 69 6e 20 |ted elem|ents in |
|00004fd0| 6c 69 73 74 2e 0d 00 01 | 00 0d 00 00 00 94 00 0d |list....|........|
|00004fe0| 00 00 00 95 00 0d 00 00 | 00 96 00 0d 00 00 00 a0 |........|........|
|00004ff0| 00 0d 00 00 00 a1 00 0d | 00 00 00 db 00 0d 00 00 |........|........|
|00005000| 01 19 00 0d 00 00 01 55 | 00 0d 00 00 01 95 00 0d |.......U|........|
|00005010| 00 00 01 96 00 0d 00 00 | 01 f2 00 0d 00 00 01 f3 |........|........|
|00005020| 00 0d 00 00 02 6a 00 0d | 00 00 02 6b 00 0d 00 00 |.....j..|...k....|
|00005030| 02 b8 00 0d 00 00 0d 4e | 6f 74 65 20 74 68 61 74 |.......N|ote that|
|00005040| 20 61 20 72 65 73 75 6c | 74 20 6f 66 20 7a 65 72 | a resul|t of zer|
|00005050| 6f 20 69 73 20 70 6f 73 | 73 69 62 6c 65 20 28 61 |o is pos|sible (a|
|00005060| 6e 64 20 76 61 6c 69 64 | 29 2c 20 66 6f 72 20 65 |nd valid|), for e|
|00005070| 69 74 68 65 72 20 66 75 | 6e 63 74 69 6f 6e 2c 20 |ither fu|nction, |
|00005080| 61 6e 64 20 61 20 72 65 | 73 75 6c 74 20 67 72 65 |and a re|sult gre|
|00005090| 61 74 65 72 20 74 68 61 | 6e 20 33 32 2c 37 36 37 |ater tha|n 32,767|
|000050a0| 20 69 73 20 61 6c 73 6f | 20 70 6f 73 73 69 62 6c | is also| possibl|
|000050b0| 65 2e 0d 0d 0d 0d 0d 70 | 61 73 63 61 6c 20 73 68 |e......p|ascal sh|
|000050c0| 6f 72 74 20 4c 69 73 74 | 62 6f 78 49 73 45 6c 65 |ort List|boxIsEle|
|000050d0| 6d 65 6e 74 53 65 6c 65 | 63 74 65 64 28 63 6f 6e |mentSele|cted(con|
|000050e0| 73 74 20 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |st listb|ox_handl|
|000050f0| 65 20 6c 69 73 74 2c 0d | 09 6c 6f 6e 67 20 65 6c |e list,.|.long el|
|00005100| 65 6d 65 6e 74 29 3b 0d | 70 61 73 63 61 6c 20 6c |ement);.|pascal l|
|00005110| 6f 6e 67 20 4c 69 73 74 | 62 6f 78 47 65 74 4e 65 |ong List|boxGetNe|
|00005120| 78 74 53 65 6c 65 63 74 | 65 64 28 63 6f 6e 73 74 |xtSelect|ed(const|
|00005130| 20 6c 69 73 74 62 6f 78 | 5f 68 61 6e 64 6c 65 20 | listbox|_handle |
|00005140| 6c 69 73 74 2c 0d 09 6c | 6f 6e 67 20 73 74 61 72 |list,..l|ong star|
|00005150| 74 5f 65 6c 65 6d 65 6e | 74 29 3b 0d 46 55 4e 43 |t_elemen|t);.FUNC|
|00005160| 54 49 4f 4e 20 4c 69 73 | 74 62 6f 78 49 73 45 6c |TION Lis|tboxIsEl|
|00005170| 65 6d 65 6e 74 53 65 6c | 65 63 74 65 64 28 6c 69 |ementSel|ected(li|
|00005180| 73 74 3a 20 6c 69 73 74 | 62 6f 78 5f 68 61 6e 64 |st: list|box_hand|
|00005190| 6c 65 3b 0d 09 65 6c 65 | 6d 65 6e 74 3a 20 4c 4f |le;..ele|ment: LO|
|000051a0| 4e 47 49 4e 54 29 20 3a | 20 49 4e 54 45 47 45 52 |NGINT) :| INTEGER|
|000051b0| 3b 0d 46 55 4e 43 54 49 | 4f 4e 20 4c 69 73 74 62 |;.FUNCTI|ON Listb|
|000051c0| 6f 78 47 65 74 4e 65 78 | 74 53 65 6c 65 63 74 65 |oxGetNex|tSelecte|
|000051d0| 64 28 6c 69 73 74 3a 20 | 6c 69 73 74 62 6f 78 5f |d(list: |listbox_|
|000051e0| 68 61 6e 64 6c 65 3b 0d | 09 73 74 61 72 74 5f 65 |handle;.|.start_e|
|000051f0| 6c 65 6d 65 6e 74 3a 20 | 4c 4f 4e 47 49 4e 54 29 |lement: |LONGINT)|
|00005200| 20 3a 20 4c 4f 4e 47 49 | 4e 54 3b 0d 0d 46 69 6e | : LONGI|NT;..Fin|
|00005210| 64 73 20 6f 75 74 20 77 | 68 69 63 68 20 65 6c 65 |ds out w|hich ele|
|00005220| 6d 65 6e 74 28 73 29 20 | 61 72 65 20 73 65 6c 65 |ment(s) |are sele|
|00005230| 63 74 65 64 20 69 6e 20 | 61 20 6c 69 73 74 2e 0d |cted in |a list..|
|00005240| 0d 54 68 65 20 66 69 72 | 73 74 20 66 75 6e 63 74 |.The fir|st funct|
|00005250| 69 6f 6e 20 d1 20 4c 69 | 73 74 62 6f 78 49 73 45 |ion . Li|stboxIsE|
|00005260| 6c 65 6d 65 6e 74 53 65 | 6c 65 63 74 65 64 20 d1 |lementSe|lected .|
|00005270| 20 72 65 74 75 72 6e 73 | 20 6e 6f 6e 2d 7a 65 72 | returns| non-zer|
|00005280| 6f 20 28 22 54 52 55 45 | 22 29 20 69 66 20 65 6c |o ("TRUE|") if el|
|00005290| 65 6d 65 6e 74 20 6f 66 | 20 6c 69 73 74 20 69 73 |ement of| list is|
|000052a0| 20 73 65 6c 65 63 74 65 | 64 2e 20 20 54 68 69 73 | selecte|d. This|
|000052b0| 20 6d 65 74 68 6f 64 20 | 63 61 6e 20 62 65 20 75 | method |can be u|
|000052c0| 73 65 64 20 74 6f 20 22 | 77 61 6c 6b 20 74 68 72 |sed to "|walk thr|
|000052d0| 6f 75 67 68 22 20 61 20 | 6c 69 73 74 20 61 6e 64 |ough" a |list and|
|000052e0| 20 74 65 73 74 20 66 6f | 72 20 61 20 73 65 6c 65 | test fo|r a sele|
|000052f0| 63 74 69 6f 6e 20 73 74 | 61 74 65 20 6f 66 20 76 |ction st|ate of v|
|00005300| 61 72 69 6f 75 73 20 65 | 6c 65 6d 65 6e 74 73 2e |arious e|lements.|
|00005310| 0d 0d 54 68 65 20 73 65 | 63 6f 6e 64 20 66 75 6e |..The se|cond fun|
|00005320| 63 74 69 6f 6e 20 d1 20 | 4c 69 73 74 62 6f 78 47 |ction . |ListboxG|
|00005330| 65 74 4e 65 78 74 53 65 | 6c 65 63 74 65 64 20 d1 |etNextSe|lected .|
|00005340| 20 77 69 6c 6c 20 72 65 | 74 75 72 6e 20 74 68 65 | will re|turn the|
|00005350| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 6e | number |of the n|
|00005360| 65 78 74 20 73 65 6c 65 | 63 74 65 64 20 65 6c 65 |ext sele|cted ele|
|00005370| 6d 65 6e 74 20 6f 66 20 | 6c 69 73 74 2c 20 62 65 |ment of |list, be|
|00005380| 67 69 6e 6e 69 6e 67 20 | 77 69 74 68 20 61 6e 64 |ginning |with and|
|00005390| 20 69 6e 63 6c 75 64 69 | 6e 67 20 65 6c 65 6d 65 | includi|ng eleme|
|000053a0| 6e 74 2e 20 20 49 66 20 | 6e 6f 20 73 65 6c 65 63 |nt. If |no selec|
|000053b0| 74 65 64 20 65 6c 65 6d | 65 6e 74 73 20 61 72 65 |ted elem|ents are|
|000053c0| 20 66 6f 75 6e 64 20 66 | 72 6f 6d 20 65 6c 65 6d | found f|rom elem|
|000053d0| 65 6e 74 20 74 6f 20 74 | 68 65 20 65 6e 64 20 6f |ent to t|he end o|
|000053e0| 66 20 74 68 65 20 6c 69 | 73 74 2c 20 4c 69 73 74 |f the li|st, List|
|000053f0| 62 6f 78 47 65 74 4e 65 | 78 74 53 65 6c 65 63 74 |boxGetNe|xtSelect|
|00005400| 65 64 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 2d |ed will |return -|
|00005410| 31 2e 0d 00 01 00 0d 00 | 00 00 7d 00 0d 00 00 00 |1.......|..}.....|
|00005420| 7e 00 0d 00 00 00 7f 00 | 0d 00 00 00 80 00 0d 00 |~.......|........|
|00005430| 00 00 81 00 0d 00 00 00 | c2 00 0d 00 00 00 c3 00 |........|........|
|00005440| 09 00 72 00 d2 00 0d 00 | 00 01 10 00 0d 00 00 01 |..r.....|........|
|00005450| 11 00 09 00 72 01 26 00 | 0d 00 00 01 5e 00 0d 00 |....r.&.|....^...|
|00005460| 00 01 5f 00 09 00 72 01 | 7c 00 0d 00 00 01 b2 00 |.._...r.||.......|
|00005470| 0d 00 00 01 b3 00 09 00 | 72 01 d6 00 0d 00 00 01 |........|r.......|
|00005480| d7 00 0d 00 00 02 0a 00 | 0d 00 00 02 0b 00 0d 00 |........|........|
|00005490| 00 02 db 00 0d 00 00 02 | dc 00 0d 00 00 03 dd 00 |........|........|
|000054a0| 0d 00 00 0d 0d 70 61 73 | 63 61 6c 20 76 6f 69 64 |.....pas|cal void|
|000054b0| 20 4c 69 73 74 62 6f 78 | 53 65 74 53 65 6c 65 63 | Listbox|SetSelec|
|000054c0| 74 69 6f 6e 28 6c 69 73 | 74 62 6f 78 5f 68 61 6e |tion(lis|tbox_han|
|000054d0| 64 6c 65 20 6c 69 73 74 | 2c 20 6c 6f 6e 67 20 73 |dle list|, long s|
|000054e0| 74 61 72 74 5f 73 65 6c | 65 63 74 2c 0d 09 6c 6f |tart_sel|ect,..lo|
|000054f0| 6e 67 20 65 6e 64 5f 73 | 65 6c 65 63 74 2c 20 73 |ng end_s|elect, s|
|00005500| 68 6f 72 74 20 73 65 6c | 65 63 74 5f 69 74 29 3b |hort sel|ect_it);|
|00005510| 0d 50 52 4f 43 45 44 55 | 52 45 20 4c 69 73 74 62 |.PROCEDU|RE Listb|
|00005520| 6f 78 53 65 74 53 65 6c | 65 63 74 69 6f 6e 28 6c |oxSetSel|ection(l|
|00005530| 69 73 74 3a 20 6c 69 73 | 74 62 6f 78 5f 68 61 6e |ist: lis|tbox_han|
|00005540| 64 6c 65 3b 0d 09 73 74 | 61 72 74 5f 73 65 6c 65 |dle;..st|art_sele|
|00005550| 63 74 3a 20 4c 4f 4e 47 | 49 4e 54 3b 20 65 6e 64 |ct: LONG|INT; end|
|00005560| 5f 73 65 6c 65 63 74 3a | 20 4c 4f 4e 47 49 4e 54 |_select:| LONGINT|
|00005570| 3b 20 73 65 6c 65 63 74 | 5f 69 74 3a 20 09 49 4e |; select|_it: .IN|
|00005580| 54 45 47 45 52 29 3b 0d | 0d 0d 53 65 6c 65 63 74 |TEGER);.|..Select|
|00005590| 73 20 6f 6e 65 20 6f 72 | 20 6d 6f 72 65 20 63 6f |s one or| more co|
|000055a0| 6e 74 69 67 75 6f 75 73 | 20 65 6c 65 6d 65 6e 74 |ntiguous| element|
|000055b0| 73 20 69 6e 20 61 20 6c | 69 73 74 2e 0d 0d 4e 6f |s in a l|ist...No|
|000055c0| 72 6d 61 6c 6c 79 2c 20 | 74 68 65 20 61 70 70 72 |rmally, |the appr|
|000055d0| 6f 70 72 69 61 74 65 20 | 6c 69 73 74 20 65 6c 65 |opriate |list ele|
|000055e0| 6d 65 6e 74 73 20 62 65 | 63 6f 6d 65 20 73 65 6c |ments be|come sel|
|000055f0| 65 63 74 65 64 20 61 75 | 74 6f 6d 61 74 69 63 61 |ected au|tomatica|
|00005600| 6c 6c 79 20 66 72 6f 6d | 20 4c 69 73 74 62 6f 78 |lly from| Listbox|
|00005610| 43 6c 69 63 6b 20 28 77 | 68 65 6e 20 74 68 65 20 |Click (w|hen the |
|00005620| 75 73 65 72 20 63 6c 69 | 63 6b 73 20 6f 6e 20 74 |user cli|cks on t|
|00005630| 68 65 20 76 61 72 69 6f | 75 73 20 65 6c 65 6d 65 |he vario|us eleme|
|00005640| 6e 74 73 29 2c 20 73 6f | 20 79 6f 75 20 6f 6e 6c |nts), so| you onl|
|00005650| 79 20 6e 65 65 64 20 74 | 6f 20 75 73 65 20 4c 69 |y need t|o use Li|
|00005660| 73 74 62 6f 78 53 65 74 | 53 65 6c 65 63 74 69 6f |stboxSet|Selectio|
|00005670| 6e 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |n if you| want to|
|00005680| 20 73 65 6c 65 63 74 20 | 65 6c 65 6d 65 6e 74 73 | select |elements|
|00005690| 20 73 6f 6d 65 20 6f 74 | 68 65 72 20 77 61 79 2e | some ot|her way.|
|000056a0| 0d 0d 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 61 |..For ex|ample, a|
|000056b0| 20 6c 69 73 74 20 70 72 | 65 73 65 6e 74 65 64 20 | list pr|esented |
|000056c0| 74 6f 20 63 68 6f 6f 73 | 65 20 61 20 66 6f 6e 74 |to choos|e a font|
|000056d0| 20 6f 72 20 73 74 79 6c | 65 20 63 6f 75 6c 64 20 | or styl|e could |
|000056e0| 73 68 6f 77 20 74 68 65 | 20 22 63 75 72 72 65 6e |show the| "curren|
|000056f0| 74 22 20 66 6f 6e 74 20 | 6f 72 20 73 74 79 6c 65 |t" font |or style|
|00005700| 2c 20 69 6e 20 77 68 69 | 63 68 20 63 61 73 65 20 |, in whi|ch case |
|00005710| 79 6f 75 20 77 6f 75 6c | 64 20 6e 65 65 64 20 74 |you woul|d need t|
|00005720| 6f 20 70 72 65 2d 73 65 | 6c 65 63 74 20 74 68 65 |o pre-se|lect the|
|00005730| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 69 74 65 | appropr|iate ite|
|00005740| 6d 28 73 29 20 62 65 66 | 6f 72 65 20 74 68 65 20 |m(s) bef|ore the |
|00005750| 75 73 65 72 20 6d 61 6b | 65 73 20 61 20 6e 65 77 |user mak|es a new|
|00005760| 20 63 68 6f 69 63 65 2e | 0d 00 01 00 0d 00 00 00 | choice.|........|
|00005770| 02 00 0d 00 00 00 4a 00 | 0d 00 00 00 4b 00 09 00 |......J.|....K...|
|00005780| 72 00 6e 00 0d 00 00 00 | a2 00 0d 00 00 00 a3 00 |r.n.....|........|
|00005790| 09 00 72 00 db 00 09 00 | 72 00 e5 00 0d 00 00 00 |..r.....|r.......|
|000057a0| e6 00 0d 00 00 00 e7 00 | 0d 00 00 01 1a 00 0d 00 |........|........|
|000057b0| 00 01 1b 00 0d 00 00 01 | fe 00 0d 00 00 01 ff 00 |........|........|
|000057c0| 0d 00 00 02 c6 00 0d 00 | 00 0d 0d 70 61 73 63 61 |........|...pasca|
|000057d0| 6c 20 76 6f 69 64 20 4c | 69 73 74 62 6f 78 44 65 |l void L|istboxDe|
|000057e0| 73 65 6c 65 63 74 41 6c | 6c 28 6c 69 73 74 62 6f |selectAl|l(listbo|
|000057f0| 78 5f 68 61 6e 64 6c 65 | 20 6c 69 73 74 2c 20 6c |x_handle| list, l|
|00005800| 6f 6e 67 20 65 78 63 65 | 70 74 69 6f 6e 29 3b 0d |ong exce|ption);.|
|00005810| 00 01 00 0d 00 00 00 02 | 00 0d 00 00 00 47 00 0d |........|.....G..|
|00005820| 00 00 50 52 4f 43 45 44 | 55 52 45 20 4c 69 73 74 |..PROCED|URE List|
|00005830| 62 6f 78 44 65 73 65 6c | 65 63 74 41 6c 6c 28 6c |boxDesel|ectAll(l|
|00005840| 69 73 74 3a 20 6c 69 73 | 74 62 6f 78 5f 68 61 6e |ist: lis|tbox_han|
|00005850| 64 6c 65 3b 20 65 78 63 | 65 70 74 69 6f 6e 3a 20 |dle; exc|eption: |
|00005860| 4c 4f 4e 47 49 4e 54 29 | 3b 0d 0d 44 65 2d 73 65 |LONGINT)|;..De-se|
|00005870| 6c 65 63 74 73 20 61 6c | 6c 20 74 68 65 20 65 6c |lects al|l the el|
|00005880| 65 6d 65 6e 74 73 20 69 | 6e 20 61 20 6c 69 73 74 |ements i|n a list|
|00005890| 20 74 68 61 74 20 61 72 | 65 20 63 75 72 72 65 6e | that ar|e curren|
|000058a0| 74 6c 79 20 73 65 6c 65 | 63 74 65 64 2e 0d 0d 00 |tly sele|cted....|
|000058b0| 48 00 0d 00 00 00 49 00 | 0d 00 00 00 8c 00 0d 00 |H.....I.|........|
|000058c0| 00 00 8d 00 0d 00 00 54 | 68 69 73 20 66 75 6e 63 |.......T|his func|
|000058d0| 74 69 6f 6e 20 69 73 20 | 74 79 70 69 63 61 6c 6c |tion is |typicall|
|000058e0| 79 20 75 73 65 64 20 74 | 6f 20 64 65 2d 73 65 6c |y used t|o de-sel|
|000058f0| 65 63 74 20 65 76 65 72 | 79 74 68 69 6e 67 20 70 |ect ever|ything p|
|00005900| 72 69 6f 72 20 74 6f 20 | 73 65 74 74 69 6e 67 20 |rior to |setting |
|00005910| 61 20 6e 65 77 20 73 65 | 6c 65 63 74 69 6f 6e 20 |a new se|lection |
|00005920| 77 69 74 68 20 4c 69 73 | 74 62 6f 78 53 65 74 53 |with Lis|tboxSetS|
|00005930| 65 6c 65 63 74 69 6f 6e | 20 28 73 69 6e 63 65 20 |election| (since |
|00005940| 4c 69 73 74 62 6f 78 53 | 65 74 53 65 6c 65 63 74 |ListboxS|etSelect|
|00005950| 69 6f 6e 20 64 6f 65 73 | 20 6e 6f 74 20 72 65 6d |ion does| not rem|
|00005960| 6f 76 65 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ove the |current |
|00005970| 73 65 6c 65 63 74 69 6f | 6e 20 69 66 20 74 68 65 |selectio|n if the|
|00005980| 20 6c 69 73 74 62 6f 78 | 20 69 73 20 65 6e 61 62 | listbox| is enab|
|00005990| 6c 65 64 20 66 6f 72 20 | 6d 75 6c 74 69 70 6c 65 |led for |multiple|
|000059a0| 20 73 65 6c 65 63 74 69 | 6f 6e 73 29 2e 0d 0d 41 | selecti|ons)...A|
|000059b0| 6c 6c 20 65 6c 65 6d 65 | 6e 74 73 20 69 6e 20 6c |ll eleme|nts in l|
|000059c0| 69 73 74 20 61 72 65 20 | 64 65 2d 73 65 6c 65 63 |ist are |de-selec|
|000059d0| 74 65 64 20 65 78 63 65 | 70 74 20 66 6f 72 20 65 |ted exce|pt for e|
|000059e0| 78 63 65 70 74 69 6f 6e | 3b 20 20 74 68 65 20 65 |xception|; the e|
|000059f0| 78 63 65 70 74 69 6f 6e | 20 70 61 72 61 6d 65 74 |xception| paramet|
|00005a00| 65 72 20 69 73 20 61 6e | 20 65 6c 65 6d 65 6e 74 |er is an| element|
|00005a10| 20 6e 75 6d 62 65 72 2c | 20 74 68 65 20 66 69 72 | number,| the fir|
|00005a20| 73 74 20 65 6c 65 6d 65 | 6e 74 20 62 65 69 6e 67 |st eleme|nt being|
|00005a30| 20 7a 65 72 6f 2e 20 20 | 49 66 20 79 6f 75 20 77 | zero. |If you w|
|00005a40| 61 6e 74 20 61 6c 6c 20 | 65 6c 65 6d 65 6e 74 73 |ant all |elements|
|00005a50| 20 74 6f 20 64 65 2d 73 | 65 6c 65 63 74 20 28 77 | to de-s|elect (w|
|00005a60| 69 74 68 20 6e 6f 20 65 | 78 63 65 70 74 69 6f 6e |ith no e|xception|
|00005a70| 73 29 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 70 |s), you |should p|
|00005a80| 61 73 73 20 2d 31 20 66 | 6f 72 20 65 78 63 65 70 |ass -1 f|or excep|
|00005a90| 74 69 6f 6e 2e 0d 0d 0d | 70 61 73 63 61 6c 20 76 |tion....|pascal v|
|00005aa0| 6f 69 64 20 4c 69 73 74 | 62 6f 78 44 65 6c 65 74 |oid List|boxDelet|
|00005ab0| 65 45 6c 65 6d 65 6e 74 | 28 6c 69 73 74 62 6f 78 |eElement|(listbox|
|00005ac0| 5f 68 61 6e 64 6c 65 20 | 6c 69 73 74 2c 20 6c 6f |_handle |list, lo|
|00005ad0| 6e 67 20 65 6c 65 6d 65 | 6e 74 29 3b 0d 70 61 73 |ng eleme|nt);.pas|
|00005ae0| 63 61 6c 20 4f 53 45 72 | 72 20 4c 69 73 74 62 6f |cal OSEr|r Listbo|
|00005af0| 78 44 65 6c 65 74 65 53 | 65 6c 65 63 74 65 64 28 |xDeleteS|elected(|
|00005b00| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 20 6c |listbox_|handle l|
|00005b10| 69 73 74 29 3b 0d 70 61 | 73 63 61 6c 20 76 6f 69 |ist);.pa|scal voi|
|00005b20| 64 20 4c 69 73 74 62 6f | 78 44 65 6c 65 74 65 41 |d Listbo|xDeleteA|
|00005b30| 6c 6c 28 6c 69 73 74 62 | 6f 78 5f 68 61 6e 64 6c |ll(listb|ox_handl|
|00005b40| 65 20 6c 69 73 74 29 3b | 0d 00 e7 00 0d 00 00 00 |e list);|........|
|00005b50| e8 00 0d 00 00 01 cf 00 | 0d 00 00 01 d0 00 0d 00 |........|........|
|00005b60| 00 01 d1 00 0d 00 00 02 | 16 00 0d 00 00 02 4f 00 |........|......O.|
|00005b70| 0d 00 00 02 82 00 0d 00 | 00 50 52 4f 43 45 44 55 |........|.PROCEDU|
|00005b80| 52 45 20 4c 69 73 74 62 | 6f 78 44 65 6c 65 74 65 |RE Listb|oxDelete|
|00005b90| 45 6c 65 6d 65 6e 74 28 | 6c 69 73 74 3a 20 6c 69 |Element(|list: li|
|00005ba0| 73 74 62 6f 78 5f 68 61 | 6e 64 6c 65 3b 20 65 6c |stbox_ha|ndle; el|
|00005bb0| 65 6d 65 6e 74 3a 20 4c | 4f 4e 47 49 4e 54 29 3b |ement: L|ONGINT);|
|00005bc0| 0d 46 55 4e 43 54 49 4f | 4e 20 4c 69 73 74 62 6f |.FUNCTIO|N Listbo|
|00005bd0| 78 44 65 6c 65 74 65 53 | 65 6c 65 63 74 65 64 28 |xDeleteS|elected(|
|00005be0| 6c 69 73 74 3a 20 6c 69 | 73 74 62 6f 78 5f 68 61 |list: li|stbox_ha|
|00005bf0| 6e 64 6c 65 29 20 3a 20 | 4f 53 45 72 72 3b 0d 50 |ndle) : |OSErr;.P|
|00005c00| 52 4f 43 45 44 55 52 45 | 20 4c 69 73 74 62 6f 78 |ROCEDURE| Listbox|
|00005c10| 44 65 6c 65 74 65 41 6c | 6c 28 6c 69 73 74 3a 20 |DeleteAl|l(list: |
|00005c20| 6c 69 73 74 62 6f 78 5f | 68 61 6e 64 6c 65 29 3b |listbox_|handle);|
|00005c30| 0d 0d 44 65 6c 65 74 65 | 73 20 65 6c 65 6d 65 6e |..Delete|s elemen|
|00005c40| 74 28 73 29 20 66 72 6f | 6d 20 61 20 6c 69 73 74 |t(s) fro|m a list|
|00005c50| 2e 0d 00 48 00 0d 00 00 | 00 86 00 0d 00 00 00 b8 |...H....|........|
|00005c60| 00 0d 00 00 00 b9 00 0d | 00 00 00 d9 00 0d 00 00 |........|........|
|00005c70| 0d 54 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 |.These f|unctions|
|00005c80| 20 70 72 6f 76 69 64 65 | 20 74 68 72 65 65 20 64 | provide| three d|
|00005c90| 69 66 66 65 72 65 6e 74 | 20 77 61 79 73 20 74 6f |ifferent| ways to|
|00005ca0| 20 64 65 6c 65 74 65 20 | 65 6c 65 6d 65 6e 74 73 | delete |elements|
|00005cb0| 20 66 72 6f 6d 20 61 20 | 6c 69 73 74 2e 0d 0d 4c | from a |list...L|
|00005cc0| 69 73 74 62 6f 78 44 65 | 6c 65 74 65 45 6c 65 6d |istboxDe|leteElem|
|00005cd0| 65 6e 74 20 77 69 6c 6c | 20 64 65 6c 65 74 65 20 |ent will| delete |
|00005ce0| 6c 69 73 74 20 65 6c 65 | 6d 65 6e 74 20 65 6c 65 |list ele|ment ele|
|00005cf0| 6d 65 6e 74 20 3b 20 20 | 74 68 69 73 20 66 75 6e |ment ; |this fun|
|00005d00| 63 74 69 6f 6e 20 69 73 | 20 75 73 65 66 75 6c 20 |ction is| useful |
|00005d10| 66 6f 72 20 64 65 6c 65 | 74 69 6e 67 20 72 61 6e |for dele|ting ran|
|00005d20| 64 6f 6d 20 65 6c 65 6d | 65 6e 74 73 20 72 65 67 |dom elem|ents reg|
|00005d30| 61 72 64 6c 65 73 73 20 | 6f 66 20 74 68 65 20 63 |ardless |of the c|
|00005d40| 75 72 72 65 6e 74 20 73 | 65 6c 65 63 74 69 6f 6e |urrent s|election|
|00005d50| 28 73 29 2e 20 20 54 68 | 65 20 66 69 72 73 74 20 |(s). Th|e first |
|00005d60| 65 6c 65 6d 65 6e 74 20 | 69 6e 20 61 20 6c 69 73 |element |in a lis|
|00005d70| 74 20 69 73 20 7a 65 72 | 6f 2e 0d 0d 4c 69 73 74 |t is zer|o...List|
|00005d80| 62 6f 78 44 65 6c 65 74 | 65 53 65 6c 65 63 74 65 |boxDelet|eSelecte|
|00005d90| 64 20 77 69 6c 6c 20 64 | 65 6c 65 74 65 20 61 6c |d will d|elete al|
|00005da0| 6c 20 65 6c 65 6d 65 6e | 74 73 20 69 6e 20 6c 69 |l elemen|ts in li|
|00005db0| 73 74 20 74 68 61 74 20 | 61 72 65 20 73 65 6c 65 |st that |are sele|
|00005dc0| 63 74 65 64 2e 20 20 54 | 68 69 73 20 66 75 6e 63 |cted. T|his func|
|00005dd0| 74 69 6f 6e 2c 20 6f 66 | 20 63 6f 75 72 73 65 2c |tion, of| course,|
|00005de0| 20 77 69 6c 6c 20 64 6f | 20 6e 6f 74 68 69 6e 67 | will do| nothing|
|00005df0| 20 69 66 20 6e 6f 20 65 | 6c 65 6d 65 6e 74 73 20 | if no e|lements |
|00005e00| 61 72 65 20 73 65 6c 65 | 63 74 65 64 2e 20 20 54 |are sele|cted. T|
|00005e10| 68 69 73 20 70 61 72 74 | 69 63 75 6c 61 72 20 66 |his part|icular f|
|00005e20| 75 6e 63 74 69 6f 6e 20 | 77 69 6c 6c 20 72 65 74 |unction |will ret|
|00005e30| 75 72 6e 20 61 20 6d 65 | 6d 6f 72 79 20 65 72 72 |urn a me|mory err|
|00005e40| 6f 72 20 69 66 20 74 68 | 65 72 65 20 77 61 73 20 |or if th|ere was |
|00005e50| 6f 6e 65 2e 0d 0d 4c 69 | 73 74 62 6f 78 44 65 6c |one...Li|stboxDel|
|00005e60| 65 74 65 41 6c 6c 20 77 | 69 6c 6c 20 64 65 6c 65 |eteAll w|ill dele|
|00005e70| 74 65 20 61 6c 6c 20 65 | 6c 65 6d 65 6e 74 73 20 |te all e|lements |
|00005e80| 69 6e 20 6c 69 73 74 20 | 75 6e 63 6f 6e 64 69 74 |in list |uncondit|
|00005e90| 69 6f 6e 61 6c 6c 79 2e | 0d 0d 0d 4d 61 72 6b 73 |ionally.|...Marks|
|00005ea0| 0d 0d 70 61 73 63 61 6c | 20 76 6f 69 64 20 4c 69 |..pascal| void Li|
|00005eb0| 73 74 62 6f 78 53 65 74 | 45 6c 65 6d 65 6e 74 4d |stboxSet|ElementM|
|00005ec0| 61 72 6b 28 6c 69 73 74 | 62 6f 78 5f 68 61 6e 64 |ark(list|box_hand|
|00005ed0| 6c 65 20 6c 69 73 74 2c | 20 6c 6f 6e 67 20 65 6c |le list,| long el|
|00005ee0| 65 6d 65 6e 74 2c 0d 09 | 73 68 6f 72 74 20 6d 61 |ement,..|short ma|
|00005ef0| 72 6b 29 3b 0d 70 61 73 | 63 61 6c 20 73 68 6f 72 |rk);.pas|cal shor|
|00005f00| 74 20 4c 69 73 74 62 6f | 78 47 65 74 45 6c 65 6d |t Listbo|xGetElem|
|00005f10| 65 6e 74 4d 61 72 6b 28 | 6c 69 73 74 62 6f 78 5f |entMark(|listbox_|
|00005f20| 68 61 6e 64 6c 65 20 6c | 69 73 74 2c 20 6c 6f 6e |handle l|ist, lon|
|00005f30| 67 20 65 6c 65 6d 65 6e | 74 29 3b 0d 00 01 00 0d |g elemen|t);.....|
|00005f40| 00 00 00 4e 00 0d 00 00 | 00 4f 00 0d 00 00 01 0b |...N....|.O......|
|00005f50| 00 0d 00 00 01 0c 00 0d | 00 00 01 e5 00 0d 00 00 |........|........|
|00005f60| 01 e6 00 0d 00 00 02 29 | 00 0d 00 00 02 2a 00 0d |.......)|.....*..|
|00005f70| 00 00 02 2b 00 0d 00 00 | 02 31 00 0d 00 00 02 32 |...+....|.1.....2|
|00005f80| 00 0d 00 00 02 77 00 0d | 00 00 02 78 00 09 00 72 |.....w..|...x...r|
|00005f90| 02 85 00 0d 00 00 02 cc | 00 0d 00 00 50 52 4f 43 |........|....PROC|
|00005fa0| 45 44 55 52 45 20 4c 69 | 73 74 62 6f 78 53 65 74 |EDURE Li|stboxSet|
|00005fb0| 45 6c 65 6d 65 6e 74 4d | 61 72 6b 28 6c 69 73 74 |ElementM|ark(list|
|00005fc0| 3a 20 6c 69 73 74 62 6f | 78 5f 68 61 6e 64 6c 65 |: listbo|x_handle|
|00005fd0| 3b 20 65 6c 65 6d 65 6e | 74 3a 20 4c 4f 4e 47 49 |; elemen|t: LONGI|
|00005fe0| 4e 54 3b 0d 09 6d 61 72 | 6b 3a 20 49 4e 54 45 47 |NT;..mar|k: INTEG|
|00005ff0| 45 52 29 3b 0d 46 55 4e | 43 54 49 4f 4e 20 4c 69 |ER);.FUN|CTION Li|
|00006000| 73 74 62 6f 78 47 65 74 | 45 6c 65 6d 65 6e 74 4d |stboxGet|ElementM|
|00006010| 61 72 6b 28 6c 69 73 74 | 3a 20 6c 69 73 74 62 6f |ark(list|: listbo|
|00006020| 78 5f 68 61 6e 64 6c 65 | 3b 0d 09 65 6c 65 6d 65 |x_handle|;..eleme|
|00006030| 6e 74 3a 20 4c 4f 4e 47 | 49 4e 54 29 20 3a 20 49 |nt: LONG|INT) : I|
|00006040| 4e 54 45 47 45 52 3b 0d | 0d 53 65 74 73 2f 67 65 |NTEGER;.|.Sets/ge|
|00006050| 74 73 20 61 6e 20 65 6c | 65 6d 65 6e 74 20 6d 61 |ts an el|ement ma|
|00006060| 72 6b 20 63 68 61 72 61 | 63 74 65 72 20 66 6f 72 |rk chara|cter for|
|00006070| 20 61 20 6c 69 73 74 20 | 65 6c 65 6d 65 6e 74 2e | a list |element.|
|00006080| 0d 00 48 00 0d 00 00 00 | 49 00 09 00 72 00 59 00 |..H.....|I...r.Y.|
|00006090| 0d 00 00 00 8e 00 0d 00 | 00 00 8f 00 09 00 72 00 |........|......r.|
|000060a0| ac 00 0d 00 00 00 ad 00 | 0d 00 00 00 e5 00 0d 00 |........|........|
|000060b0| 00 0d 41 6e 20 65 6c 65 | 6d 65 6e 74 20 6d 61 72 |..An ele|ment mar|
|000060c0| 6b 20 69 73 20 61 20 63 | 68 61 72 61 63 74 65 72 |k is a c|haracter|
|000060d0| 20 74 68 61 74 20 69 73 | 20 64 72 61 77 6e 20 74 | that is| drawn t|
|000060e0| 6f 20 74 68 65 20 6c 65 | 66 74 20 6f 66 20 61 20 |o the le|ft of a |
|000060f0| 6c 69 73 74 20 65 6c 65 | 6d 65 6e 74 2e 20 20 54 |list ele|ment. T|
|00006100| 68 65 73 65 20 6d 61 72 | 6b 20 63 68 61 72 61 63 |hese mar|k charac|
|00006110| 74 65 72 73 20 61 72 65 | 20 64 72 61 77 6e 20 69 |ters are| drawn i|
|00006120| 6e 20 74 68 65 20 65 6c | 65 6d 65 6e 74 20 6d 61 |n the el|ement ma|
|00006130| 72 6b 20 66 6f 6e 74 2f | 73 74 79 6c 65 2c 20 77 |rk font/|style, w|
|00006140| 68 69 63 68 20 69 73 20 | 69 6e 64 65 70 65 6e 64 |hich is |independ|
|00006150| 65 6e 74 20 6f 66 20 74 | 68 65 20 6c 69 73 74 20 |ent of t|he list |
|00006160| 65 6c 65 6d 65 6e 74 20 | 66 6f 6e 74 2f 73 74 79 |element |font/sty|
|00006170| 6c 65 2e 0d 0d 54 68 65 | 20 6d 6f 73 74 20 74 79 |le...The| most ty|
|00006180| 70 69 63 61 6c 20 75 73 | 65 20 66 6f 72 20 65 6c |pical us|e for el|
|00006190| 65 6d 65 6e 74 20 6d 61 | 72 6b 73 20 69 73 20 74 |ement ma|rks is t|
|000061a0| 6f 20 22 63 68 65 63 6b | 6d 61 72 6b 22 20 28 12 |o "check|mark" (.|
|000061b0| 29 20 61 6e 20 69 74 65 | 6d 20 69 6e 20 61 20 6c |) an ite|m in a l|
|000061c0| 69 73 74 2e 20 20 54 6f | 20 64 6f 20 73 6f 2c 20 |ist. To| do so, |
|000061d0| 75 73 65 20 4c 69 73 74 | 62 6f 78 53 65 74 45 6c |use List|boxSetEl|
|000061e0| 65 6d 65 6e 74 4d 61 72 | 6b 2c 20 70 61 73 73 69 |ementMar|k, passi|
|000061f0| 6e 67 20 74 68 65 20 6c | 69 73 74 5f 68 61 6e 64 |ng the l|ist_hand|
|00006200| 6c 65 20 69 6e 20 6c 69 | 73 74 2c 20 74 68 65 20 |le in li|st, the |
|00006210| 65 6c 65 6d 65 6e 74 20 | 6e 75 6d 62 65 72 20 69 |element |number i|
|00006220| 6e 20 65 6c 65 6d 65 6e | 74 20 61 6e 64 20 61 20 |n elemen|t and a |
|00006230| 63 68 65 63 6b 6d 61 72 | 6b 20 41 53 43 49 49 20 |checkmar|k ASCII |
|00006240| 76 61 6c 75 65 20 28 63 | 6f 6e 74 72 6f 6c 2d 72 |value (c|ontrol-r|
|00006250| 20 6f 72 20 68 65 78 20 | 31 32 29 20 69 6e 20 6d | or hex |12) in m|
|00006260| 61 72 6b 2e 0d 0d 41 6c | 74 68 6f 75 67 68 20 63 |ark...Al|though c|
|00006270| 68 65 63 6b 6d 61 72 6b | 69 6e 67 20 69 73 20 74 |heckmark|ing is t|
|00006280| 68 65 20 6d 6f 73 74 20 | 63 6f 6d 6d 6f 6e 2c 20 |he most |common, |
|00006290| 74 68 65 20 6d 61 72 6b | 20 63 68 61 72 61 63 74 |the mark| charact|
|000062a0| 65 72 20 63 61 6e 20 62 | 65 20 61 6e 79 74 68 69 |er can b|e anythi|
|000062b0| 6e 67 2e 0d 0d 54 6f 20 | 22 75 6e 6d 61 72 6b 22 |ng...To |"unmark"|
|000062c0| 20 61 6e 20 65 6c 65 6d | 65 6e 74 20 28 74 6f 20 | an elem|ent (to |
|000062d0| 6d 61 6b 65 20 69 74 20 | 67 6f 20 61 77 61 79 29 |make it |go away)|
|000062e0| 2c 20 75 73 65 20 4c 69 | 73 74 62 6f 78 53 65 74 |, use Li|stboxSet|
|000062f0| 45 6c 65 6d 65 6e 74 4d | 61 72 6b 20 61 6e 64 20 |ElementM|ark and |
|00006300| 70 61 73 73 20 7a 65 72 | 6f 20 28 6e 75 6c 6c 20 |pass zer|o (null |
|00006310| 63 68 61 72 61 63 74 65 | 72 29 20 66 6f 72 20 6d |characte|r) for m|
|00006320| 61 72 6b 2e 0d 0d 00 01 | 00 0d 00 00 00 c3 00 0d |ark.....|........|
|00006330| 00 00 00 c4 00 0d 00 00 | 00 ff 00 12 00 00 01 b4 |........|........|
|00006340| 00 0d 00 00 01 b5 00 0d | 00 00 02 03 00 0d 00 00 |........|........|
|00006350| 02 04 00 0d 00 00 02 74 | 00 0d 00 00 02 75 00 0d |.......t|.....u..|
|00006360| 00 00 0d 70 61 73 63 61 | 6c 20 6c 6f 6e 67 20 4c |...pasca|l long L|
|00006370| 69 73 74 62 6f 78 47 65 | 74 4e 65 78 74 4d 61 72 |istboxGe|tNextMar|
|00006380| 6b 65 64 28 63 6f 6e 73 | 74 20 6c 69 73 74 62 6f |ked(cons|t listbo|
|00006390| 78 5f 68 61 6e 64 6c 65 | 20 6c 69 73 74 2c 0d 09 |x_handle| list,..|
|000063a0| 6c 6f 6e 67 20 73 74 61 | 72 74 5f 65 6c 65 6d 65 |long sta|rt_eleme|
|000063b0| 6e 74 29 3b 0d 46 55 4e | 43 54 49 4f 4e 20 4c 69 |nt);.FUN|CTION Li|
|000063c0| 73 74 62 6f 78 47 65 74 | 4e 65 78 74 4d 61 72 6b |stboxGet|NextMark|
|000063d0| 65 64 28 6c 69 73 74 3a | 20 6c 69 73 74 62 6f 78 |ed(list:| listbox|
|000063e0| 5f 68 61 6e 64 6c 65 3b | 0d 09 73 74 61 72 74 5f |_handle;|..start_|
|000063f0| 65 6c 65 6d 65 6e 74 3a | 20 4c 4f 4e 47 49 4e 54 |element:| LONGINT|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.